diff --git a/src/NzbDrone.Core/Indexers/Definitions/TorrentLeech.cs b/src/NzbDrone.Core/Indexers/Definitions/TorrentLeech.cs index 6b21342ee..c2c74d7f1 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/TorrentLeech.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/TorrentLeech.cs @@ -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() diff --git a/src/NzbDrone.Core/Localization/Core/en.json b/src/NzbDrone.Core/Localization/Core/en.json index 82bfa8088..f0c0a9047 100644 --- a/src/NzbDrone.Core/Localization/Core/en.json +++ b/src/NzbDrone.Core/Localization/Core/en.json @@ -191,16 +191,18 @@ "IndexerPriority": "Indexer Priority", "IndexerPriorityHelpText": "Indexer Priority from 1 (Highest) to 50 (Lowest). Default: 25.", "IndexerProxies": "Indexer Proxies", - "IndexerSettingsSummary": "Configure various global Indexer settings including Proxies.", "IndexerProxyStatusCheckAllClientMessage": "All proxies are unavailable due to failures", "IndexerProxyStatusCheckSingleClientMessage": "Proxies unavailable due to failures: {0}", "IndexerQuery": "Indexer Query", "IndexerRss": "Indexer Rss", "Indexers": "Indexers", + "IndexerSettingsSummary": "Configure various global Indexer settings including Proxies.", "IndexersSelectedInterp": "{0} Indexer(s) Selected", "IndexerStatusCheckAllClientMessage": "All indexers are unavailable due to failures", "IndexerStatusCheckSingleClientMessage": "Indexers unavailable due to failures: {0}", "IndexerTagsHelpText": "Use tags to specify default clients, specify Indexer Proxies, or just to organize your indexers.", + "IndexerVipCheckExpiredClientMessage": "Indexer VIP benefits have expired: {0}", + "IndexerVipCheckExpiringClientMessage": "Indexer VIP benefits expiring soon: {0}", "Info": "Info", "InteractiveSearch": "Interactive Search", "Interval": "Interval", @@ -239,8 +241,6 @@ "Name": "Name", "NetCore": ".NET", "New": "New", - "IndexerVipCheckExpiredClientMessage": "Indexer VIP benefits have expired: {0}", - "IndexerVipCheckExpiringClientMessage": "Indexer VIP benefits expiring soon: {0}", "NoBackupsAreAvailable": "No backups are available", "NoChange": "No Change", "NoChanges": "No Changes",