New: Add Monitored specification to Auto Tagging

This commit is contained in:
Bogdan 2023-07-26 09:46:47 +03:00 committed by Mark McDowall
parent c69b5fc72a
commit 8bd91bd86b
1 changed files with 28 additions and 0 deletions

View File

@ -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));
}
}
}