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>()); } }
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 }); }
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(); }