Exemple #1
0
        public void GetMovieByImdb()
        {
            var result = api.GetMovieByIMDB("tt1764651");

            Assert.IsNotNull(result);
            PrintMovie(result);
        }
Exemple #2
0
        public override bool GetResults(string keywords, string imdbID, bool skipImages)
        {
            bool result = false;

            api           = new Tmdb(AccessKey, FileManager.Configuration.Options.MovieSheetsOptions.TVShowsLanguage);
            configuration = api.GetConfiguration();

            TmdbMovie movie = null;

            if (!string.IsNullOrEmpty(imdbID))
            {
                movie = api.GetMovieByIMDB(imdbID, FileManager.Configuration.Options.MovieSheetsOptions.TVShowsLanguage);
                if (movie != null)
                {
                    result = GetResults(new[] { movie });
                }
            }
            if (movie == null)// no imdb identification,use list
            {
                var searchResults = api.SearchMovie(Escape(keywords), 1);
                if (searchResults.results.Any())
                {
                    var list = searchResults.results.Select(item => api.GetMovieInfo(item.id)).ToList();
                    result = GetResults(list);
                }
            }

            return(result);
        }
Exemple #3
0
 public override MovieInfo QueryMovieInfo(string imdbId)
 {
     if (!string.IsNullOrEmpty(imdbId))
     {
         if (api == null)
         {
             api = new Tmdb(AccessKey, FileManager.Configuration.Options.MovieSheetsOptions.TVShowsLanguage);
         }
         var movie = api.GetMovieByIMDB(imdbId, FileManager.Configuration.Options.MovieSheetsOptions.TVShowsLanguage);
         if (movie != null)
         {
             return(GetMovieInfo(movie));
         }
     }
     return(null);
 }