From 253546ded0db4801f794305eadee0f60cf4a6432 Mon Sep 17 00:00:00 2001 From: Leonardo Galli Date: Thu, 9 Aug 2018 18:08:12 +0200 Subject: [PATCH] Fixed: Invalid qualities messing up the release module and other stuff. --- src/NzbDrone.Core/Qualities/Quality.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/NzbDrone.Core/Qualities/Quality.cs b/src/NzbDrone.Core/Qualities/Quality.cs index f82967dec..9ffa09c0b 100644 --- a/src/NzbDrone.Core/Qualities/Quality.cs +++ b/src/NzbDrone.Core/Qualities/Quality.cs @@ -212,11 +212,15 @@ public static explicit operator int(Quality quality) return quality.Id; } + //TODO: Go back to fully parsing the quality from the start! public static Quality FindByInfo(Source source, Resolution resolution, Modifier modifier) { return All.SingleOrDefault(q => - q.Source == source && ((q.Resolution == resolution) || - (q.Resolution == Resolution.Unknown)) && (q.Modifier == modifier)); + q.Source == source && ((q.Resolution == resolution) || + (q.Resolution == Resolution.Unknown)) && (q.Modifier == modifier)) ?? + All.FirstOrDefault(q => q.Source == source && ((q.Resolution == resolution) || + (q.Resolution == Resolution.Unknown))) ?? + Unknown; } } }