Пример #1
0
        public List <MovieResult> movieResultsBySearch(string searchTerm)
        {
            if (searchTerm.Count() != 0)
            {
                TmdbMovieSearch results = api.SearchMovie(searchTerm, 1);
                return((api.SearchMovie(searchTerm, 1) as TmdbMovieSearch).results);
            }

            else
            {
                return(new List <MovieResult>());
            }
        }
Пример #2
0
 public static MovieSearchResultModel MapToModel(this TmdbMovieSearch movie)
 {
     return(new MovieSearchResultModel
     {
         Id = movie.Id,
         Title = movie.Title,
         Overview = movie.Overview,
         Popularity = movie.Popularity,
         OriginalTitle = movie.OriginalTitle,
         OriginalLanguage = movie.OriginalLanguage,
         ReleaseDate = movie.ReleaseDate,
         VoteAverage = movie.VoteAverage,
         VoteCount = movie.VoteCount
     });
 }
Пример #3
0
        private void SearchTmdb(TmdbApiParameters requestParameters, Job job)
        {
            GetBaseImageUrl();

            _tmdbMovieSearch = _tmdbApi.SearchMovie(requestParameters.Query, 1, requestParameters.Iso6391, false,
                                                    requestParameters.Year);

            if (_tmdbMovieSearch == null)
            {
                Logger.Warn("TMDb movie search returned null");
                return;
            }

            job.Movies.AddRange(_tmdbMovieSearch.results.Select(ToMovie));

            LogSearchResults();
        }
Пример #4
0
        private void SearchTmdb(TmdbApiParameters requestParameters, Job job)
        {
            GetBaseImageUrl();

            _tmdbMovieSearch = _tmdbApi.SearchMovie(requestParameters.Query, 1, requestParameters.Iso6391, false,
                                                    requestParameters.Year);

            if (_tmdbMovieSearch == null)
            {
                Logger.Warn("TMDb movie search returned null");
                return;
            }

            job.Movies.AddRange(_tmdbMovieSearch.results.Select(ToMovie));

            LogSearchResults();
        }