New: Trakt Recommended Lists

Fixes #5980

Co-Authored-By: Michael Casey <7644535+Snarkenfaugister@users.noreply.github.com>
This commit is contained in:
Qstick 2021-02-28 21:09:15 -05:00
parent abe8a06c11
commit aa9880b8dd
2 changed files with 31 additions and 9 deletions

View File

@ -20,6 +20,14 @@ namespace NzbDrone.Core.ImportLists.Trakt.Popular
[EnumMember(Value = "Top Watched Movies By Year")] [EnumMember(Value = "Top Watched Movies By Year")]
TopWatchedByYear = 6, TopWatchedByYear = 6,
[EnumMember(Value = "Top Watched Movies Of All Time")] [EnumMember(Value = "Top Watched Movies Of All Time")]
TopWatchedByAllTime = 7 TopWatchedByAllTime = 7,
[EnumMember(Value = "Recommended Movies By Week")]
RecommendedByWeek = 8,
[EnumMember(Value = "Recommended Movies By Month")]
RecommendedByMonth = 9,
[EnumMember(Value = "Recommended Movies By Year")]
RecommendedByYear = 10,
[EnumMember(Value = "Recommended Movies Of All Time")]
RecommendedByAllTime = 11
} }
} }

View File

@ -32,31 +32,45 @@ namespace NzbDrone.Core.ImportLists.Trakt.Popular
switch (Settings.TraktListType) switch (Settings.TraktListType)
{ {
case (int)TraktPopularListType.Trending: case (int)TraktPopularListType.Trending:
link += "movies/trending" + filtersAndLimit; link += "movies/trending";
break; break;
case (int)TraktPopularListType.Popular: case (int)TraktPopularListType.Popular:
link += "movies/popular" + filtersAndLimit; link += "movies/popular";
break; break;
case (int)TraktPopularListType.Anticipated: case (int)TraktPopularListType.Anticipated:
link += "movies/anticipated" + filtersAndLimit; link += "movies/anticipated";
break; break;
case (int)TraktPopularListType.BoxOffice: case (int)TraktPopularListType.BoxOffice:
link += "movies/boxoffice" + filtersAndLimit; link += "movies/boxoffice";
break; break;
case (int)TraktPopularListType.TopWatchedByWeek: case (int)TraktPopularListType.TopWatchedByWeek:
link += "movies/watched/weekly" + filtersAndLimit; link += "movies/watched/weekly";
break; break;
case (int)TraktPopularListType.TopWatchedByMonth: case (int)TraktPopularListType.TopWatchedByMonth:
link += "movies/watched/monthly" + filtersAndLimit; link += "movies/watched/monthly";
break; break;
case (int)TraktPopularListType.TopWatchedByYear: case (int)TraktPopularListType.TopWatchedByYear:
link += "movies/watched/yearly" + filtersAndLimit; link += "movies/watched/yearly";
break; break;
case (int)TraktPopularListType.TopWatchedByAllTime: case (int)TraktPopularListType.TopWatchedByAllTime:
link += "movies/watched/all" + filtersAndLimit; link += "movies/watched/all";
break;
case (int)TraktPopularListType.RecommendedByWeek:
link += "movies/recommended/weekly";
break;
case (int)TraktPopularListType.RecommendedByMonth:
link += "movies/recommended/monthly";
break;
case (int)TraktPopularListType.RecommendedByYear:
link += "movies/recommended/yearly";
break;
case (int)TraktPopularListType.RecommendedByAllTime:
link += "movies/recommended/yearly";
break; break;
} }
link += filtersAndLimit;
var request = new ImportListRequest(_traktProxy.BuildTraktRequest(link, HttpMethod.GET, Settings.AccessToken)); var request = new ImportListRequest(_traktProxy.BuildTraktRequest(link, HttpMethod.GET, Settings.AccessToken));
yield return request; yield return request;