Clean up Trakt a little (#735)

pull/2/head
Devin Buhl 8 years ago committed by GitHub
parent 758228e159
commit a3e681078f

@ -12,13 +12,13 @@ namespace NzbDrone.Core.NetImport.Trakt
UserCustomList = 2,
[EnumMember(Value = "Trending Movies")]
TrendingMovies = 3,
Trending = 3,
[EnumMember(Value = "Popular Movies")]
PopularMovies = 4,
Popular = 4,
[EnumMember(Value = "Top Anticipated Movies")]
AnticipatedMovies = 5,
Anticipated = 5,
[EnumMember(Value = "Top Box Office Movies")]
BoxOfficeMovies = 6,
BoxOffice = 6,
[EnumMember(Value = "Top Watched Movies By Week")]
TopWatchedByWeek = 7,

@ -42,7 +42,7 @@ namespace NzbDrone.Core.NetImport.Trakt
return movies;
}
if (_settings.ListType == (int) TraktListType.PopularMovies)
if (_settings.ListType == (int) TraktListType.Popular)
{
var jsonResponse = JsonConvert.DeserializeObject<List<Movie>>(_importResponse.Content);

@ -34,16 +34,16 @@ namespace NzbDrone.Core.NetImport.Trakt
case (int)TraktListType.UserWatchedList:
link = link + $"/users/{Settings.Username.Trim()}/watched/movies";
break;
case (int)TraktListType.TrendingMovies:
case (int)TraktListType.Trending:
link = link + "/movies/trending";
break;
case (int)TraktListType.PopularMovies:
case (int)TraktListType.Popular:
link = link + "/movies/popular";
break;
case (int)TraktListType.AnticipatedMovies:
case (int)TraktListType.Anticipated:
link = link + "/movies/anticipated";
break;
case (int)TraktListType.BoxOfficeMovies:
case (int)TraktListType.BoxOffice:
link = link + "/movies/boxoffice";
break;
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.")]
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; }
[FieldDefinition(2, Label = "Trakt Username", HelpText = "Required for User List")]
[FieldDefinition(2, Label = "Username", HelpText = "Required for User List")]
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; }
}

Loading…
Cancel
Save