New: (TorrentLeech) Add VIP Expiration

Closes #419
bonus- sort en.json
This commit is contained in:
bakerboy448
2021-08-13 11:08:05 -05:00
parent 03f821f484
commit 46e1cce632
2 changed files with 15 additions and 4 deletions
@@ -329,6 +329,14 @@ namespace NzbDrone.Core.Indexers.Definitions
{
RuleFor(c => c.Username).NotEmpty();
RuleFor(c => c.Password).NotEmpty();
RuleFor(c => c.VipExpiration).Must(c => c.IsValidDate())
.When(c => c.VipExpiration.IsNotNullOrWhiteSpace())
.WithMessage("Correctly formatted date is required");
RuleFor(c => c.VipExpiration).Must(c => c.IsFutureDate())
.When(c => c.VipExpiration.IsNotNullOrWhiteSpace())
.WithMessage("Must be a future date");
}
}
@@ -354,7 +362,10 @@ namespace NzbDrone.Core.Indexers.Definitions
[FieldDefinition(4, Label = "FreeLeech Only", Type = FieldType.Checkbox, Advanced = true, HelpText = "Search Freeleech torrents only")]
public bool FreeLeechOnly { get; set; }
[FieldDefinition(5)]
[FieldDefinition(5, Label = "VIP Expiration", HelpText = "Enter date (yyyy-mm-dd) for VIP Expiration or blank, Prowlarr will notify 1 week from expiration of VIP")]
public string VipExpiration { get; set; }
[FieldDefinition(6)]
public IndexerBaseSettings BaseSettings { get; set; } = new IndexerBaseSettings();
public NzbDroneValidationResult Validate()