mirror of
https://github.com/Readarr/Readarr
synced 2025-12-06 08:24:52 +01:00
New: Add Monitored specification to Auto Tagging
(cherry picked from commit 8bd91bd86b5955da5d19c9f866e7de701b843e7b)
This commit is contained in:
parent
704635f758
commit
0660b697ed
1 changed files with 28 additions and 0 deletions
|
|
@ -0,0 +1,28 @@
|
||||||
|
using FluentValidation;
|
||||||
|
using NzbDrone.Core.Tv;
|
||||||
|
using NzbDrone.Core.Validation;
|
||||||
|
|
||||||
|
namespace NzbDrone.Core.AutoTagging.Specifications
|
||||||
|
{
|
||||||
|
public class MonitoredSpecificationValidator : AbstractValidator<MonitoredSpecification>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public class MonitoredSpecification : AutoTaggingSpecificationBase
|
||||||
|
{
|
||||||
|
private static readonly MonitoredSpecificationValidator Validator = new ();
|
||||||
|
|
||||||
|
public override int Order => 1;
|
||||||
|
public override string ImplementationName => "Monitored";
|
||||||
|
|
||||||
|
protected override bool IsSatisfiedByWithoutNegate(Series series)
|
||||||
|
{
|
||||||
|
return series.Monitored;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override NzbDroneValidationResult Validate()
|
||||||
|
{
|
||||||
|
return new NzbDroneValidationResult(Validator.Validate(this));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue