From 9a0ca650a3fda891d2d4a773a72520d30622bd3f Mon Sep 17 00:00:00 2001 From: Bakerboy448 <55419169+bakerboy448@users.noreply.github.com> Date: Fri, 18 Aug 2023 15:09:32 -0500 Subject: [PATCH] Fixed: Dont Parse 24-bit as group --- src/NzbDrone.Core.Test/ParserTests/ReleaseGroupParserFixture.cs | 2 ++ src/NzbDrone.Core/Parser/Parser.cs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core.Test/ParserTests/ReleaseGroupParserFixture.cs b/src/NzbDrone.Core.Test/ParserTests/ReleaseGroupParserFixture.cs index 2af35e18e7..c12236ae11 100644 --- a/src/NzbDrone.Core.Test/ParserTests/ReleaseGroupParserFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/ReleaseGroupParserFixture.cs @@ -53,6 +53,8 @@ namespace NzbDrone.Core.Test.ParserTests [TestCase("Movie.Name.2022.1080p.BluRay.x264-[YTS.AG]", "YTS.AG")] [TestCase("Movie.Name.2022.1080p.BluRay.x264-VARYG", "VARYG")] [TestCase("Movie.Title.2019.1080p.AMZN.WEB-Rip.DDP.5.1.HEVC", null)] + [TestCase("Movie Name (2017) [2160p REMUX] [HEVC DV HYBRID HDR10+ Dolby TrueHD Atmos 7 1 24-bit Audio English] [Data Lass]", null)] + [TestCase("Movie Name (2017) [2160p REMUX] [HEVC DV HYBRID HDR10+ Dolby TrueHD Atmos 7 1 24-bit Audio English]-DataLass", "DataLass")] public void should_parse_expected_release_group(string title, string expected) { Parser.Parser.ParseReleaseGroup(title).Should().Be(expected); diff --git a/src/NzbDrone.Core/Parser/Parser.cs b/src/NzbDrone.Core/Parser/Parser.cs index 06f5102220..12644eb846 100644 --- a/src/NzbDrone.Core/Parser/Parser.cs +++ b/src/NzbDrone.Core/Parser/Parser.cs @@ -140,7 +140,7 @@ namespace NzbDrone.Core.Parser private static readonly Regex CleanQualityBracketsRegex = new Regex(@"\[[a-z0-9 ._-]+\]$", RegexOptions.IgnoreCase | RegexOptions.Compiled); - private static readonly Regex ReleaseGroupRegex = new Regex(@"-(?[a-z0-9]+(?-[a-z0-9]+)?(?!.+?(?:480p|576p|720p|1080p|2160p)))(?\d+)|(?tt\d{7,8}))(?:\k)?)(?:\b|[-._ ]|$)|[-._ ]\[(?[a-z0-9]+)\]$", + private static readonly Regex ReleaseGroupRegex = new Regex(@"-(?[a-z0-9]+(?-[a-z0-9]+)?(?!.+?(?:480p|576p|720p|1080p|2160p)))(?\d+)|(?tt\d{7,8}))(?:\k)?)(?:\b|[-._ ]|$)|[-._ ]\[(?[a-z0-9]+)\]$", RegexOptions.IgnoreCase | RegexOptions.Compiled); private static readonly Regex InvalidReleaseGroupRegex = new Regex(@"^([se]\d+|[0-9a-f]{8})$", RegexOptions.IgnoreCase | RegexOptions.Compiled);