From 9d0b8d974d5eefc796a3df55f0aeddb9eda4e3c6 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Wed, 25 Sep 2024 02:52:00 +0300 Subject: [PATCH] Fixed: Parsing of Hybrid-Remux --- src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs | 5 ++++- src/NzbDrone.Core/Parser/QualityParser.cs | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs b/src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs index 20af516fb..c1f399b26 100644 --- a/src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs @@ -7,7 +7,6 @@ namespace NzbDrone.Core.Test.ParserTests { [TestFixture] - public class QualityParserFixture : CoreTest { [SetUp] @@ -332,6 +331,8 @@ public void should_parse_remux720p_as_bluray720p_quality(string title) [TestCase("[Vodes] Movie Title - Other Title (2020) [BDRemux 1080p HEVC Dual-Audio]")] [TestCase("This.Wonderful.Movie.1991.German.ML.1080p.BluRay.AVC-GeRMaNSCeNEGRoUP")] [TestCase("Movie.Name.2011.1080p.DD.2.0.AVC.REMUX-FraMeSToR")] + [TestCase("Movie Name 2018 1080p BluRay Hybrid-REMUX AVC TRUEHD 5.1 Dual Audio-ZR-")] + [TestCase("Movie.Name.2018.1080p.BluRay.Hybrid-REMUX.AVC.TRUEHD.5.1.Dual.Audio-ZR-")] public void should_parse_remux1080p_quality(string title) { ParseAndVerifyQuality(title, QualitySource.BLURAY, false, Resolution.R1080p, Modifier.REMUX); @@ -346,6 +347,8 @@ public void should_parse_remux1080p_quality(string title) [TestCase("Movie Name (2021) [Remux-2160p x265 HDR 10-BIT DTS-HD MA 7.1]-FraMeSToR.mkv")] [TestCase("This.Wonderful.Movie.1991.German.ML.2160p.BluRay.HEVC-GeRMaNSCeNEGRoUP")] [TestCase("Movie.Name.2011.2160p.DD.2.0.AVC.REMUX-FraMeSToR")] + [TestCase("Movie Name 2018 2160p BluRay Hybrid-REMUX AVC TRUEHD 5.1 Dual Audio-ZR-")] + [TestCase("Movie.Name.2018.2160p.BluRay.Hybrid-REMUX.AVC.TRUEHD.5.1.Dual.Audio-ZR-")] public void should_parse_remux2160p_quality(string title) { ParseAndVerifyQuality(title, QualitySource.BLURAY, false, Resolution.R2160p, Modifier.REMUX); diff --git a/src/NzbDrone.Core/Parser/QualityParser.cs b/src/NzbDrone.Core/Parser/QualityParser.cs index f3e842725..35da89933 100644 --- a/src/NzbDrone.Core/Parser/QualityParser.cs +++ b/src/NzbDrone.Core/Parser/QualityParser.cs @@ -73,7 +73,7 @@ public class QualityParser private static readonly Regex HighDefPdtvRegex = new (@"hr[-_. ]ws", RegexOptions.Compiled | RegexOptions.IgnoreCase); - private static readonly Regex RemuxRegex = new (@"(?:[_. \[]|\d{4}p-)(?(?:(BD|UHD)[-_. ]?)?Remux)\b|(?(?:(BD|UHD)[-_. ]?)?Remux[_. ]\d{4}p)", RegexOptions.Compiled | RegexOptions.IgnoreCase); + private static readonly Regex RemuxRegex = new (@"(?:[_. \[]|\d{4}p-|\bHybrid-)(?(?:(BD|UHD)[-_. ]?)?Remux)\b|(?(?:(BD|UHD)[-_. ]?)?Remux[_. ]\d{4}p)", RegexOptions.Compiled | RegexOptions.IgnoreCase); private static readonly Regex GermanRemuxRegex = new Regex(@"((?<=\d{4}).*German.*([DM]L)?)(?=.*\b(AVC|HEVC|VC[_. -]?1|MVC|MPEG[_. -]?2))(?=.*Blu-?ray)", RegexOptions.Compiled | RegexOptions.IgnoreCase); public static QualityModel ParseQuality(string name)