mirror of
https://github.com/Radarr/Radarr
synced 2026-01-17 13:03:26 +01:00
New: Add Monitored specification to Auto Tagging
This commit is contained in:
parent
f2bbef75dd
commit
a79980aae5
1 changed files with 28 additions and 0 deletions
|
|
@ -0,0 +1,28 @@
|
|||
using FluentValidation;
|
||||
using NzbDrone.Core.Movies;
|
||||
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(Movie movie)
|
||||
{
|
||||
return movie.Monitored;
|
||||
}
|
||||
|
||||
public override NzbDroneValidationResult Validate()
|
||||
{
|
||||
return new NzbDroneValidationResult(Validator.Validate(this));
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue