From bee7e4325f8d3c79572f2a088e661d2133f15158 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sun, 11 Jan 2026 14:04:40 -0800 Subject: [PATCH] New: Parse non-ASCII release groups Closes #8341 --- src/NzbDrone.Core.Test/ParserTests/ReleaseGroupParserFixture.cs | 2 ++ src/NzbDrone.Core/Parser/ReleaseGroupParser.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 b7eacf114..a2634d7e4 100644 --- a/src/NzbDrone.Core.Test/ParserTests/ReleaseGroupParserFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/ReleaseGroupParserFixture.cs @@ -49,6 +49,8 @@ namespace NzbDrone.Core.Test.ParserTests [TestCase("Series Title S01 [2160p REMUX] [HEVC DV HYBRID HDR10+ Dolby TrueHD Atmos 7 1 24-bit Audio English]-DataLass", "DataLass")] [TestCase("Series Title S01 REMUX Dual Audio AVC 1080p 8-Bit-ZR-", "ZR")] [TestCase("Show.Name.2009.S01.1080p.BluRay.DTS5.1.x264-D-Z0N3", "D-Z0N3")] + [TestCase("Series Stampede S01 MULTi 1080p BD x265 Opus AAC -Báleygr", "Báleygr")] + [TestCase("Series S01E01 VOSTFR 1080p WEB x265 EAC3 -Hveðrungr", "Hveðrungr")] public void should_parse_release_group(string title, string expected) { Parser.ReleaseGroupParser.ParseReleaseGroup(title).Should().Be(expected); diff --git a/src/NzbDrone.Core/Parser/ReleaseGroupParser.cs b/src/NzbDrone.Core/Parser/ReleaseGroupParser.cs index 5feede30b..dd3c35de8 100644 --- a/src/NzbDrone.Core/Parser/ReleaseGroupParser.cs +++ b/src/NzbDrone.Core/Parser/ReleaseGroupParser.cs @@ -6,7 +6,7 @@ namespace NzbDrone.Core.Parser; public static class ReleaseGroupParser { - private static readonly Regex ReleaseGroupRegex = new(@"-(?[a-z0-9]+(?-[a-z0-9]+)?(?!.+?(?:HDTV|SDTV|480p|576p|720p|1080p|2160p)))(?)?)(?:\b|[-._ ]|$)|[-._ ]\[(?[a-z0-9]+)\]$", + private static readonly Regex ReleaseGroupRegex = new(@"-(?[A-Za-zÀ-ÖØ-öø-ÿ0-9]+(?-[A-Za-zÀ-ÖØ-öø-ÿ0-9]+)?(?!.+?(?:HDTV|SDTV|480p|576p|720p|1080p|2160p)))(?)?)(?:\b|[-._ ]|$)|[-._ ]\[(?[A-Za-zÀ-ÖØ-öø-ÿ0-9]+)\]$", RegexOptions.IgnoreCase | RegexOptions.Compiled); private static readonly Regex InvalidReleaseGroupRegex = new(@"^([se]\d+|[0-9a-f]{8})$", RegexOptions.IgnoreCase | RegexOptions.Compiled);