From 79e570e571575e380f4718336112d840f6658083 Mon Sep 17 00:00:00 2001 From: Leonardo Galli Date: Tue, 21 Aug 2018 21:56:49 +0200 Subject: [PATCH] Fixed: Absolutely Required Format Tag modifier being ignored when multiple modifiers were present Fixes #2971 --- .../.idea.NzbDrone/.idea/contentModel.xml | 33 +++++++++---------- .../CustomFormats/FormatTagMatchResult.cs | 2 +- 2 files changed, 16 insertions(+), 19 deletions(-) diff --git a/src/.idea/.idea.NzbDrone/.idea/contentModel.xml b/src/.idea/.idea.NzbDrone/.idea/contentModel.xml index 7bb9c32d7..5f78a1506 100644 --- a/src/.idea/.idea.NzbDrone/.idea/contentModel.xml +++ b/src/.idea/.idea.NzbDrone/.idea/contentModel.xml @@ -1,24 +1,21 @@ - + - - - + + + - - - - - - - + + + + - + @@ -70,10 +67,10 @@ - - - - + + + + @@ -3328,7 +3325,7 @@ - + @@ -3340,7 +3337,7 @@ - + diff --git a/src/NzbDrone.Core/CustomFormats/FormatTagMatchResult.cs b/src/NzbDrone.Core/CustomFormats/FormatTagMatchResult.cs index 93e1cf602..f17a476aa 100644 --- a/src/NzbDrone.Core/CustomFormats/FormatTagMatchResult.cs +++ b/src/NzbDrone.Core/CustomFormats/FormatTagMatchResult.cs @@ -34,7 +34,7 @@ public bool DidMatch { get { - return !(Matches.Any(m => m.Key.TagModifier == TagModifier.AbsolutelyRequired && m.Value == false) || + return !(Matches.Any(m => m.Key.TagModifier.HasFlag(TagModifier.AbsolutelyRequired) && m.Value == false) || Matches.All(m => m.Value == false)); } }