From 67dffcdc69d48b05d33b5d3dcd4fd4f2ac4e4f2e Mon Sep 17 00:00:00 2001 From: Qstick Date: Wed, 16 Oct 2019 22:19:39 -0400 Subject: [PATCH] Fixed: 4K and Remux Parser Tweaks --- src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs | 2 ++ src/NzbDrone.Core/Parser/QualityParser.cs | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs b/src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs index 6b85a6738..72f031043 100644 --- a/src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs @@ -181,6 +181,7 @@ namespace NzbDrone.Core.Test.ParserTests [TestCase("The.Simpsons.S25E21.Pay.Pal.1080p.WEB-DL.DD5.1.H.264-NTb", false)] [TestCase("The.Simpsons.2017.1080p.WEB-DL.DD5.1.H.264.Remux.-NTb", false)] [TestCase("Series.Title.1x04.ITA.1080p.WEBMux.x264-NovaRip", false)] + [TestCase("Fast.and.Furious.Presents.Hobbs.and.Shaw.2019.1080p.AMZN.WEB-DL.DDP5.1.H.264-NTG", false)] public void should_parse_webdl1080p_quality(string title, bool proper) { ParseAndVerifyQuality(title, Source.WEBDL, proper, Resolution.R1080P); @@ -255,6 +256,7 @@ namespace NzbDrone.Core.Test.ParserTests [TestCase("Contract.to.Kill.2016.REMUX.2160p.BluRay.AVC.DTS-HD.MA.5.1-iFT")] [TestCase("27.Dresses.2008.REMUX.2160p.Bluray.AVC.DTS-HR.MA.5.1-LEGi0N")] + [TestCase("The.Shining.1980.2160p.UHD.BluRay.Remux.HDR.HEVC.DTS-HD.MA.5.1-PmP.mkv")] public void should_parse_remux2160p_quality(string title) { ParseAndVerifyQuality(title, Source.BLURAY, false, Resolution.R2160P, Modifier.REMUX); diff --git a/src/NzbDrone.Core/Parser/QualityParser.cs b/src/NzbDrone.Core/Parser/QualityParser.cs index 12ddf8c82..facc425e2 100644 --- a/src/NzbDrone.Core/Parser/QualityParser.cs +++ b/src/NzbDrone.Core/Parser/QualityParser.cs @@ -37,7 +37,7 @@ namespace NzbDrone.Core.Parser private static readonly Regex HardcodedSubsRegex = new Regex(@"\b(?(\w+SUBS?)\b)|(?(HC|SUBBED))\b", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace); - private static readonly Regex RemuxRegex = new Regex(@"\b(?(BD)?Remux)\b", + private static readonly Regex RemuxRegex = new Regex(@"\b(?(BD)?[-_. ]?Remux)\b", RegexOptions.Compiled | RegexOptions.IgnoreCase); private static readonly Regex BRDISKRegex = new Regex(@"\b(COMPLETE|ISO|BDISO|BD25|BD50|BR.?DISK)\b", @@ -55,7 +55,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(?:(?480(i|p)|640x480|848x480)|(?576(i|p))|(?720(i|p)|1280x720)|(?1080(i|p)|1920x1080)|(?2160(i|p)|UHD))\b", + private static readonly Regex ResolutionRegex = new Regex(@"\b(?:(?480(i|p)|640x480|848x480)|(?576(i|p))|(?720(i|p)|1280x720)|(?1080p|1920x1080|1440p|FHD|1080i)|(?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)|(?X-?vid)|(?divx))\b",