From 2601a68cd4f4af723ab0d11df5dc59c7d068abe8 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Fri, 26 Nov 2021 18:56:43 -0800 Subject: [PATCH] New: Parse 960p as 720p instead of 480p Closes #4757 --- src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs | 1 + src/NzbDrone.Core/Parser/QualityParser.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs b/src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs index a3fd2dd9c..18447246c 100644 --- a/src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs @@ -202,6 +202,7 @@ namespace NzbDrone.Core.Test.ParserTests [TestCase("Series.S03E05.Griebnitzsee.German.720p.MaxdomeHD.AVC-TVS", false)] [TestCase("[HorribleSubs] Series Title! S01 [Web][MKV][h264][720p][AAC 2.0][Softsubs (HorribleSubs)]", false)] [TestCase("[HorribleSubs] Series Title! S01 [Web][MKV][h264][AAC 2.0][Softsubs (HorribleSubs)]", false)] + [TestCase("Series.Title.S04E13.960p.WEB-DL.AAC2.0.H.264-squalor", false)] public void should_parse_webdl720p_quality(string title, bool proper) { ParseAndVerifyQuality(title, Quality.WEBDL720p, proper); diff --git a/src/NzbDrone.Core/Parser/QualityParser.cs b/src/NzbDrone.Core/Parser/QualityParser.cs index b1ff26681..ef7cef68f 100644 --- a/src/NzbDrone.Core/Parser/QualityParser.cs +++ b/src/NzbDrone.Core/Parser/QualityParser.cs @@ -46,7 +46,7 @@ namespace NzbDrone.Core.Parser private static readonly Regex RealRegex = new Regex(@"\b(?REAL)\b", RegexOptions.Compiled); - private static readonly Regex ResolutionRegex = new Regex(@"\b(?:(?360p)|(?480p|640x480|848x480)|(?540p)|(?576p)|(?720p|1280x720)|(?1080p|1920x1080|1440p|FHD|1080i|4kto1080p)|(?2160p|4k[-_. ](?:UHD|HEVC|BD)|(?:UHD|HEVC|BD)[-_. ]4k))\b", + private static readonly Regex ResolutionRegex = new Regex(@"\b(?:(?360p)|(?480p|640x480|848x480)|(?540p)|(?576p)|(?720p|1280x720|960p)|(?1080p|1920x1080|1440p|FHD|1080i|4kto1080p)|(?2160p|4k[-_. ](?:UHD|HEVC|BD)|(?:UHD|HEVC|BD)[-_. ]4k))\b", RegexOptions.Compiled | RegexOptions.IgnoreCase);