1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-20 21:55:03 -04:00

Onedr0p/3 8 17 (#1087)

* Move ToUrlSlug to Parser, fix issue with trakt lists that have non-alphanumeric characters

* Move "Add movies" link in nav to the first link

* String interpolation!

* Add Limit to Trakt List Settings to limit the amount of movies returned, 50 by default

* Updates to FailedDownload

* Update DownloadService and CompleteDownloadService
This commit is contained in:
Devin Buhl
2017-03-08 19:00:00 -05:00
committed by GitHub
parent 5c22d0b61d
commit 571730ddec
11 changed files with 67 additions and 115 deletions
@@ -43,6 +43,11 @@ namespace NzbDrone.Core.NetImport.Trakt
.Matches(@"^\d+(\-\d+)?$", RegexOptions.IgnoreCase)
.When(c => c.Years.IsNotNullOrWhiteSpace())
.WithMessage("Not a valid year or range of years");
// Limit not smaller than 1 and not larger than 100
RuleFor(c => c.Limit)
.InclusiveBetween(1, 500)
.WithMessage("Must be 1 thru 500");
}
}
@@ -60,6 +65,7 @@ namespace NzbDrone.Core.NetImport.Trakt
Ceritification = "NR,G,PG,PG-13,R,NC-17";
Genres = "";
Years = "";
Limit = 100;
}
[FieldDefinition(0, Label = "Trakt API URL", HelpText = "Link to to Trakt API URL, do not change unless you know what you are doing.")]
@@ -86,6 +92,9 @@ namespace NzbDrone.Core.NetImport.Trakt
[FieldDefinition(7, Label = "Years", HelpText = "Filter movies by year or year range")]
public string Years { get; set; }
[FieldDefinition(8, Label = "Limit", HelpText = "Limit the number of movies to get")]
public int Limit { get; set; }
public NzbDroneValidationResult Validate()
{