|
|
@ -46,44 +46,44 @@ namespace PlexRequests.Api
|
|
|
|
public TMDbClient Client { get; set; }
|
|
|
|
public TMDbClient Client { get; set; }
|
|
|
|
public async Task<List<SearchMovie>> SearchMovie(string searchTerm)
|
|
|
|
public async Task<List<SearchMovie>> SearchMovie(string searchTerm)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var results = await Client.SearchMovieAsync(searchTerm);
|
|
|
|
var results = await Client.SearchMovie(searchTerm);
|
|
|
|
return results.Results;
|
|
|
|
return results.Results;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[Obsolete("Should use TvMaze for TV")]
|
|
|
|
[Obsolete("Should use TvMaze for TV")]
|
|
|
|
public async Task<List<SearchTv>> SearchTv(string searchTerm)
|
|
|
|
public async Task<List<SearchTv>> SearchTv(string searchTerm)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var results = await Client.SearchTvShowAsync(searchTerm);
|
|
|
|
var results = await Client.SearchTvShow(searchTerm);
|
|
|
|
return results.Results;
|
|
|
|
return results.Results;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public async Task<List<SearchMovie>> GetCurrentPlayingMovies()
|
|
|
|
public async Task<List<MovieResult>> GetCurrentPlayingMovies()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var movies = await Client.GetMovieNowPlayingListAsync();
|
|
|
|
var movies = await Client.GetMovieList(MovieListType.NowPlaying);
|
|
|
|
return movies.Results;
|
|
|
|
return movies.Results;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
public async Task<List<SearchMovie>> GetUpcomingMovies()
|
|
|
|
public async Task<List<MovieResult>> GetUpcomingMovies()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var movies = await Client.GetMovieUpcomingListAsync();
|
|
|
|
var movies = await Client.GetMovieList(MovieListType.Upcoming);
|
|
|
|
return movies.Results;
|
|
|
|
return movies.Results;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public async Task<Movie> GetMovieInformation(int tmdbId)
|
|
|
|
public async Task<Movie> GetMovieInformation(int tmdbId)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var movies = await Client.GetMovieAsync(tmdbId);
|
|
|
|
var movies = await Client.GetMovie(tmdbId);
|
|
|
|
return movies;
|
|
|
|
return movies;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public async Task<Movie> GetMovieInformation(string imdbId)
|
|
|
|
public async Task<Movie> GetMovieInformation(string imdbId)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var movies = await Client.GetMovieAsync(imdbId);
|
|
|
|
var movies = await Client.GetMovie(imdbId);
|
|
|
|
return movies;
|
|
|
|
return movies;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[Obsolete("Should use TvMaze for TV")]
|
|
|
|
[Obsolete("Should use TvMaze for TV")]
|
|
|
|
public async Task<TvShow> GetTvShowInformation(int tmdbId)
|
|
|
|
public async Task<TvShow> GetTvShowInformation(int tmdbId)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var show = await Client.GetTvShowAsync(tmdbId);
|
|
|
|
var show = await Client.GetTvShow(tmdbId);
|
|
|
|
return show;
|
|
|
|
return show;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|