本文整理汇总了C#中MediaPortal.Video.Database.IMDBFetcher.Fetch方法的典型用法代码示例。如果您正苦于以下问题:C# IMDBFetcher.Fetch方法的具体用法?C# IMDBFetcher.Fetch怎么用?C# IMDBFetcher.Fetch使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MediaPortal.Video.Database.IMDBFetcher
的用法示例。
在下文中一共展示了IMDBFetcher.Fetch方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RefreshIMDB
//.........这里部分代码省略.........
{
strMovieName = Path.GetFileNameWithoutExtension(strFileName);
}
// Test pattern (CD, DISC(K), Part, X-Y...) and remove it from filename
var pattern = Util.Utils.StackExpression();
for (int i = 0; i < pattern.Length; i++)
{
if (_foldercheck == false && pattern[i].IsMatch(strMovieName))
{
strMovieName = pattern[i].Replace(strMovieName, "");
}
}
}
}
}
if ((strMovieName == string.Empty) || (strMovieName == Strings.Unknown))
{
return true;
}
}
if (currentMovie.ID == -1 && addToDatabase)
{
currentMovie.ID = VideoDatabase.AddMovieFile(strFileName);
}
currentMovie.SearchString = strMovieName;
if (currentMovie.ID >= 0 || !addToDatabase)
{
if (!Win32API.IsConnectedToInternet())
{
return false;
}
IMDBFetcher fetcher = new IMDBFetcher(progress);
fetcher.Movie = currentMovie;
fetcher._getActors = getActors;
int selectedMovie = -1;
do
{
if (!fetcher.Fetch(strMovieName))
{
return false;
}
if (fuzzyMatching)
{
IMDB tmpImdb = new IMDB();
selectedMovie = fetcher.FuzzyMatch(tmpImdb.GetSearchString(fetcher.MovieName));
if (selectedMovie == -1 && fetcher.Count > 0)
{
if (!fetcher.OnSelectMovie(fetcher, out selectedMovie))
{
return false;
}
if (selectedMovie == -1)
{
if (!fetcher.OnRequestMovieTitle(fetcher, out strMovieName))
{
return false;
}
if (strMovieName == string.Empty)
{
return false;
}
}
}
else if (selectedMovie == -1)