From 1716651447bf98edd09746eb376e4882f3516b97 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Wed, 26 Jul 2023 09:46:47 +0300 Subject: [PATCH] New: Add Monitored specification to Auto Tagging (cherry picked from commit 8bd91bd86b5955da5d19c9f866e7de701b843e7b) --- .../Specifications/MonitoredSpecification.cs | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/NzbDrone.Core/AutoTagging/Specifications/MonitoredSpecification.cs diff --git a/src/NzbDrone.Core/AutoTagging/Specifications/MonitoredSpecification.cs b/src/NzbDrone.Core/AutoTagging/Specifications/MonitoredSpecification.cs new file mode 100644 index 000000000..4246b092b --- /dev/null +++ b/src/NzbDrone.Core/AutoTagging/Specifications/MonitoredSpecification.cs @@ -0,0 +1,28 @@ +using FluentValidation; +using NzbDrone.Core.Music; +using NzbDrone.Core.Validation; + +namespace NzbDrone.Core.AutoTagging.Specifications +{ + public class MonitoredSpecificationValidator : AbstractValidator + { + } + + public class MonitoredSpecification : AutoTaggingSpecificationBase + { + private static readonly MonitoredSpecificationValidator Validator = new (); + + public override int Order => 1; + public override string ImplementationName => "Monitored"; + + protected override bool IsSatisfiedByWithoutNegate(Artist artist) + { + return artist.Monitored; + } + + public override NzbDroneValidationResult Validate() + { + return new NzbDroneValidationResult(Validator.Validate(this)); + } + } +}