mirror of
https://github.com/Radarr/Radarr
synced 2025-12-14 20:33:44 +01:00
Fixed: Priority validation for indexers and download clients
(cherry picked from commit f0e320f3aa501f120721503b8256f464a31be783)
This commit is contained in:
parent
8efce68922
commit
bcd4fe1f08
2 changed files with 4 additions and 0 deletions
|
|
@ -1,3 +1,4 @@
|
|||
using FluentValidation;
|
||||
using NzbDrone.Core.Download;
|
||||
using NzbDrone.SignalR;
|
||||
using Radarr.Http;
|
||||
|
|
@ -13,6 +14,7 @@ public class DownloadClientController : ProviderControllerBase<DownloadClientRes
|
|||
public DownloadClientController(IBroadcastSignalRMessage signalRBroadcaster, IDownloadClientFactory downloadClientFactory)
|
||||
: base(signalRBroadcaster, downloadClientFactory, "downloadclient", ResourceMapper, BulkResourceMapper)
|
||||
{
|
||||
SharedValidator.RuleFor(c => c.Priority).InclusiveBetween(1, 50);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
using FluentValidation;
|
||||
using NzbDrone.Core.Indexers;
|
||||
using NzbDrone.Core.Validation;
|
||||
using NzbDrone.SignalR;
|
||||
|
|
@ -16,6 +17,7 @@ public IndexerController(IBroadcastSignalRMessage signalRBroadcaster,
|
|||
DownloadClientExistsValidator downloadClientExistsValidator)
|
||||
: base(signalRBroadcaster, indexerFactory, "indexer", ResourceMapper, BulkResourceMapper)
|
||||
{
|
||||
SharedValidator.RuleFor(c => c.Priority).InclusiveBetween(1, 50);
|
||||
SharedValidator.RuleFor(c => c.DownloadClientId).SetValidator(downloadClientExistsValidator);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue