From 056a699daf2ed0b8314f0b4d6bdec20cd24818c3 Mon Sep 17 00:00:00 2001 From: bakerboy448 <55419169+bakerboy448@users.noreply.github.com> Date: Tue, 29 Dec 2020 19:06:55 -0600 Subject: [PATCH] Fixed: Parsing of 4Kto1080p as 1080p closes #4199 --- 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 96eb510dc..da7e286e4 100644 --- a/src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs @@ -240,6 +240,7 @@ namespace NzbDrone.Core.Test.ParserTests [TestCase("Better.Call.Saul.S03E09.1080p.NF.WEBRip.DD5.1.x264-ViSUM", false)] [TestCase("The Walking Dead S09E13 1.54 GB WEB-RIP 1080p Dual-Audio 2019 MKV", false)] [TestCase("Series.Title.1x04.ITA.1080p.WEBMux.x264-NovaRip", false)] + [TestCase("The.Mandalorian.2019.S02E07.Chapter.15.The.Believer.4Kto1080p.DSNYP.Webrip.x265.10bit.EAC3.5.1.Atmos.GokiTAoE", false)] public void should_parse_webrip1080p_quality(string title, bool proper) { ParseAndVerifyQuality(title, Quality.WEBRip1080p, proper); diff --git a/src/NzbDrone.Core/Parser/QualityParser.cs b/src/NzbDrone.Core/Parser/QualityParser.cs index 3101157a4..c4e906d0a 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)|(?576p)|(?720p|1280x720)|(?1080p|1920x1080|1440p|FHD|1080i)|(?2160p|4k[-_. ](?:UHD|HEVC|BD)|(?:UHD|HEVC|BD)[-_. ]4k))\b", + private static readonly Regex ResolutionRegex = new Regex(@"\b(?:(?360p)|(?480p|640x480|848x480)|(?576p)|(?720p|1280x720)|(?1080p|1920x1080|1440p|FHD|1080i|4kto1080p)|(?2160p|4k[-_. ](?:UHD|HEVC|BD)|(?:UHD|HEVC|BD)[-_. ]4k))\b", RegexOptions.Compiled | RegexOptions.IgnoreCase); private static readonly Regex CodecRegex = new Regex(@"\b(?:(?x264)|(?h264)|(?XvidHD)|(?Xvid)|(?divx))\b",