mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-25 22:37:27 -04:00
New: Trending and Popular Movies in Discovery
This commit is contained in:
@@ -877,7 +877,9 @@
|
||||
"MovieIsDownloading": "Movie is downloading",
|
||||
"MovieIsMonitored": "Movie is monitored",
|
||||
"MovieIsOnImportExclusionList": "Movie is on Import Exclusion List",
|
||||
"MovieIsPopular": "Movie is Popular on TMDb",
|
||||
"MovieIsRecommend": "Movie is recommended based on recent addition",
|
||||
"MovieIsTrending": "Movie is Trending on TMDb",
|
||||
"MovieIsUnmonitored": "Movie is unmonitored",
|
||||
"MovieMatchType": "Movie Match Type",
|
||||
"MovieNaming": "Movie Naming",
|
||||
|
||||
@@ -12,6 +12,8 @@ namespace NzbDrone.Core.MetadataSource
|
||||
Tuple<MovieMetadata, List<Credit>> GetMovieInfo(int tmdbId);
|
||||
MovieCollection GetCollectionInfo(int tmdbId);
|
||||
List<MovieMetadata> GetBulkMovieInfo(List<int> tmdbIds);
|
||||
List<MovieMetadata> GetTrendingMovies();
|
||||
List<MovieMetadata> GetPopularMovies();
|
||||
|
||||
HashSet<int> GetChangedMovies(DateTime startTime);
|
||||
}
|
||||
|
||||
@@ -70,6 +70,34 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
|
||||
return new HashSet<int>(response.Resource);
|
||||
}
|
||||
|
||||
public List<MovieMetadata> GetTrendingMovies()
|
||||
{
|
||||
var request = _radarrMetadata.Create()
|
||||
.SetSegment("route", "list/tmdb/trending")
|
||||
.Build();
|
||||
|
||||
request.AllowAutoRedirect = true;
|
||||
request.SuppressHttpError = true;
|
||||
|
||||
var response = _httpClient.Get<List<MovieResource>>(request);
|
||||
|
||||
return response.Resource.DistinctBy(x => x.TmdbId).Select(MapMovie).ToList();
|
||||
}
|
||||
|
||||
public List<MovieMetadata> GetPopularMovies()
|
||||
{
|
||||
var request = _radarrMetadata.Create()
|
||||
.SetSegment("route", "list/tmdb/popular")
|
||||
.Build();
|
||||
|
||||
request.AllowAutoRedirect = true;
|
||||
request.SuppressHttpError = true;
|
||||
|
||||
var response = _httpClient.Get<List<MovieResource>>(request);
|
||||
|
||||
return response.Resource.DistinctBy(x => x.TmdbId).Select(MapMovie).ToList();
|
||||
}
|
||||
|
||||
public Tuple<MovieMetadata, List<Credit>> GetMovieInfo(int tmdbId)
|
||||
{
|
||||
var httpRequest = _radarrMetadata.Create()
|
||||
|
||||
Reference in New Issue
Block a user