当前位置: 首页>>代码示例>>C#>>正文


C# IMDBFetcher.FetchDetails方法代码示例

本文整理汇总了C#中MediaPortal.Video.Database.IMDBFetcher.FetchDetails方法的典型用法代码示例。如果您正苦于以下问题:C# IMDBFetcher.FetchDetails方法的具体用法?C# IMDBFetcher.FetchDetails怎么用?C# IMDBFetcher.FetchDetails使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MediaPortal.Video.Database.IMDBFetcher的用法示例。


在下文中一共展示了IMDBFetcher.FetchDetails方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RefreshIMDB


//.........这里部分代码省略.........
              }
            }
            else if (selectedMovie == -1)
            {
              if (!fetcher.OnMovieNotFound(fetcher))
              {
                return false;
              }
              if (!fetcher.OnRequestMovieTitle(fetcher, out strMovieName))
              {
                return false;
              }
              if (strMovieName == string.Empty)
              {
                return false;
              }
            }
          }
          else
          {
            if (fetcher.Count > 0)
            {
              // EPG - one result, get movie without ask
              if (fetcher.Count == 1 && !addToDatabase)
              {
                selectedMovie = 0;
                break;
              }
              
              int iMoviesFound = fetcher.Count;
              //GEMX 28.03.08: There should always be a choice to enter the movie manually 
              //               in case the 1 and only found name is wrong
              if (iMoviesFound > 0)
              {
                if (!fetcher.OnSelectMovie(fetcher, out selectedMovie))
                {
                  return false;
                }
                
                if (selectedMovie < 0)
                {
                  
                  if (!fetcher.OnRequestMovieTitle(fetcher, out strMovieName))
                  {
                    return false;
                  }
                  
                  if (strMovieName == string.Empty)
                  {
                    return false;
                  }
                }
              }
            }
            else
            {
              if (!fetcher.OnMovieNotFound(fetcher))
              {
                return false;
              }
              
              if (!fetcher.OnRequestMovieTitle(fetcher, out strMovieName))
              {
                return false;
              }
              
              if (strMovieName == string.Empty)
              {
                return false;
              }
            }
          }
        } while (selectedMovie < 0);
        
        if (!fetcher.FetchDetails(selectedMovie, ref currentMovie, addToDatabase))
        {
          return false;
        }
        
        IMDBMovie movieDetails = fetcher.Movie;

        if (movieDetails != null)
        {
          Log.Info("RefreshIMDB() - Found movie and added info for: {0} (Year: {1})",
                   movieDetails.Title, movieDetails.Year);

          movieDetails.SearchString = strMovieName;
          currentMovie = movieDetails;
          return true;
        }
        
        if (fetcher.Movie == null)
        {
          fetcher.Movie = currentMovie;
        }
        
        return fetcher.OnDetailsNotFound(fetcher);
      }
      return false;
    }
开发者ID:elliottmc,项目名称:MediaPortal-1,代码行数:101,代码来源:IMDBFetcher.cs


注:本文中的MediaPortal.Video.Database.IMDBFetcher.FetchDetails方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。