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")]
TopWatchedByYear = 6,
[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)
{
case (int)TraktPopularListType.Trending:
link += "movies/trending" + filtersAndLimit;
link += "movies/trending";
break;
case (int)TraktPopularListType.Popular:
link += "movies/popular" + filtersAndLimit;
link += "movies/popular";
break;
case (int)TraktPopularListType.Anticipated:
link += "movies/anticipated" + filtersAndLimit;
link += "movies/anticipated";
break;
case (int)TraktPopularListType.BoxOffice:
link += "movies/boxoffice" + filtersAndLimit;
link += "movies/boxoffice";
break;
case (int)TraktPopularListType.TopWatchedByWeek:
link += "movies/watched/weekly" + filtersAndLimit;
link += "movies/watched/weekly";
break;
case (int)TraktPopularListType.TopWatchedByMonth:
link += "movies/watched/monthly" + filtersAndLimit;
link += "movies/watched/monthly";
break;
case (int)TraktPopularListType.TopWatchedByYear:
link += "movies/watched/yearly" + filtersAndLimit;
link += "movies/watched/yearly";
break;
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;
}
link += filtersAndLimit;
var request = new ImportListRequest(_traktProxy.BuildTraktRequest(link, HttpMethod.GET, Settings.AccessToken));
yield return request;