1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-22 22:15:17 -04:00

Added options for watched, and watchlist, and customlist to trakt

This commit is contained in:
Devin Buhl
2017-01-28 21:17:55 -05:00
parent be083cfd53
commit 5b7d513986
6 changed files with 50 additions and 7 deletions
@@ -7,6 +7,15 @@ using NzbDrone.Core.Validation;
namespace NzbDrone.Core.NetImport.Trakt
{
public class TraktSettingsValidator : AbstractValidator<TraktSettings>
{
public TraktSettingsValidator()
{
RuleFor(c => c.Link).ValidRootUrl();
RuleFor(c => c.Username).NotEmpty();
}
}
public class TraktSettings : NetImportBaseSettings
{
public TraktSettings()
@@ -19,10 +28,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 Username", HelpText = "Trakt Username the list belongs to.")]
[FieldDefinition(1, Label = "Trakt 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 = "Trakt Username the list belongs to.")]
public string Username { get; set; }
[FieldDefinition(2, Label = "Trakt List Name", HelpText = "Trakt List Name")]
[FieldDefinition(3, Label = "Trakt List Name", HelpText = "Required for Custom List")]
public string Listname { get; set; }
}