From ac9a98e498808f814a03ea00d7ce8f105969078d Mon Sep 17 00:00:00 2001 From: bakerboy448 <55419169+bakerboy448@users.noreply.github.com> Date: Wed, 11 Aug 2021 17:29:30 -0500 Subject: [PATCH] New: Parse Release Groups with a `-` in their name (based on radarr commit ea801665e4f3b7c505e2c2f37a4ef941a15e2c2d) --- src/NzbDrone.Core.Test/ParserTests/ReleaseGroupParserFixture.cs | 1 + src/NzbDrone.Core/Parser/Parser.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core.Test/ParserTests/ReleaseGroupParserFixture.cs b/src/NzbDrone.Core.Test/ParserTests/ReleaseGroupParserFixture.cs index e60dba77a..5b4d88646 100644 --- a/src/NzbDrone.Core.Test/ParserTests/ReleaseGroupParserFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/ReleaseGroupParserFixture.cs @@ -38,6 +38,7 @@ namespace NzbDrone.Core.Test.ParserTests [TestCase("SomeShow.S20E13.1080p.BluRay.DTS-ES.5.1.x264",null)] [TestCase("SomeShow.S20E13.1080p.Blu-Ray.DTS-ES.5.1.x264",null)] [TestCase("SomeShow.S20E13.1080p.Blu-Ray.DTS-ES.5.1.x264-ROUGH [PublicHD]", "ROUGH")] + [TestCase("SomeShow S01E168 1080p WEB-DL AAC 2.0 x264-Erai-raws", "Erai-raws")] //[TestCase("", "")] public void should_parse_release_group(string title, string expected) { diff --git a/src/NzbDrone.Core/Parser/Parser.cs b/src/NzbDrone.Core/Parser/Parser.cs index 92cdf5048..f24425183 100644 --- a/src/NzbDrone.Core/Parser/Parser.cs +++ b/src/NzbDrone.Core/Parser/Parser.cs @@ -442,7 +442,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]+(?!.+?(?:480p|720p|1080p|2160p)))(?[a-z0-9]+)\]$", + private static readonly Regex ReleaseGroupRegex = new Regex(@"-(?[a-z0-9]+(?-[a-z0-9]+)?(?!.+?(?:480p|720p|1080p|2160p)))(?)?)(?:\b|[-._ ]|$)|[-._ ]\[(?[a-z0-9]+)\]$", RegexOptions.IgnoreCase | RegexOptions.Compiled);