mirror of https://github.com/Radarr/Radarr
Clean up Trakt a little (#735)
This commit is contained in:
parent
758228e159
commit
a3e681078f
|
@ -12,13 +12,13 @@ namespace NzbDrone.Core.NetImport.Trakt
|
||||||
UserCustomList = 2,
|
UserCustomList = 2,
|
||||||
|
|
||||||
[EnumMember(Value = "Trending Movies")]
|
[EnumMember(Value = "Trending Movies")]
|
||||||
TrendingMovies = 3,
|
Trending = 3,
|
||||||
[EnumMember(Value = "Popular Movies")]
|
[EnumMember(Value = "Popular Movies")]
|
||||||
PopularMovies = 4,
|
Popular = 4,
|
||||||
[EnumMember(Value = "Top Anticipated Movies")]
|
[EnumMember(Value = "Top Anticipated Movies")]
|
||||||
AnticipatedMovies = 5,
|
Anticipated = 5,
|
||||||
[EnumMember(Value = "Top Box Office Movies")]
|
[EnumMember(Value = "Top Box Office Movies")]
|
||||||
BoxOfficeMovies = 6,
|
BoxOffice = 6,
|
||||||
|
|
||||||
[EnumMember(Value = "Top Watched Movies By Week")]
|
[EnumMember(Value = "Top Watched Movies By Week")]
|
||||||
TopWatchedByWeek = 7,
|
TopWatchedByWeek = 7,
|
||||||
|
|
|
@ -42,7 +42,7 @@ namespace NzbDrone.Core.NetImport.Trakt
|
||||||
return movies;
|
return movies;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_settings.ListType == (int) TraktListType.PopularMovies)
|
if (_settings.ListType == (int) TraktListType.Popular)
|
||||||
{
|
{
|
||||||
var jsonResponse = JsonConvert.DeserializeObject<List<Movie>>(_importResponse.Content);
|
var jsonResponse = JsonConvert.DeserializeObject<List<Movie>>(_importResponse.Content);
|
||||||
|
|
||||||
|
|
|
@ -34,16 +34,16 @@ namespace NzbDrone.Core.NetImport.Trakt
|
||||||
case (int)TraktListType.UserWatchedList:
|
case (int)TraktListType.UserWatchedList:
|
||||||
link = link + $"/users/{Settings.Username.Trim()}/watched/movies";
|
link = link + $"/users/{Settings.Username.Trim()}/watched/movies";
|
||||||
break;
|
break;
|
||||||
case (int)TraktListType.TrendingMovies:
|
case (int)TraktListType.Trending:
|
||||||
link = link + "/movies/trending";
|
link = link + "/movies/trending";
|
||||||
break;
|
break;
|
||||||
case (int)TraktListType.PopularMovies:
|
case (int)TraktListType.Popular:
|
||||||
link = link + "/movies/popular";
|
link = link + "/movies/popular";
|
||||||
break;
|
break;
|
||||||
case (int)TraktListType.AnticipatedMovies:
|
case (int)TraktListType.Anticipated:
|
||||||
link = link + "/movies/anticipated";
|
link = link + "/movies/anticipated";
|
||||||
break;
|
break;
|
||||||
case (int)TraktListType.BoxOfficeMovies:
|
case (int)TraktListType.BoxOffice:
|
||||||
link = link + "/movies/boxoffice";
|
link = link + "/movies/boxoffice";
|
||||||
break;
|
break;
|
||||||
case (int)TraktListType.TopWatchedByWeek:
|
case (int)TraktListType.TopWatchedByWeek:
|
||||||
|
|
|
@ -26,13 +26,13 @@ namespace NzbDrone.Core.NetImport.Trakt
|
||||||
[FieldDefinition(0, Label = "Trakt API URL", HelpText = "Link to to Trakt API URL, do not change unless you know what you are doing.")]
|
[FieldDefinition(0, Label = "Trakt API URL", HelpText = "Link to to Trakt API URL, do not change unless you know what you are doing.")]
|
||||||
public new string Link { get; set; }
|
public new string Link { get; set; }
|
||||||
|
|
||||||
[FieldDefinition(1, Label = "Trakt List Type", Type = FieldType.Select, SelectOptions = typeof(TraktListType), HelpText = "Trakt list type, custom or watchlist")]
|
[FieldDefinition(1, Label = "List Type", Type = FieldType.Select, SelectOptions = typeof(TraktListType), HelpText = "Trakt list type, custom or watchlist")]
|
||||||
public int ListType { get; set; }
|
public int ListType { get; set; }
|
||||||
|
|
||||||
[FieldDefinition(2, Label = "Trakt Username", HelpText = "Required for User List")]
|
[FieldDefinition(2, Label = "Username", HelpText = "Required for User List")]
|
||||||
public string Username { get; set; }
|
public string Username { get; set; }
|
||||||
|
|
||||||
[FieldDefinition(3, Label = "Trakt List Name", HelpText = "Required for Custom List")]
|
[FieldDefinition(3, Label = "List Name", HelpText = "Required for Custom List")]
|
||||||
public string Listname { get; set; }
|
public string Listname { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue