From 561fdef81530f7e26d5e1b2e1ee3189b0cdc7867 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Wed, 30 Jan 2019 18:31:01 -0800 Subject: [PATCH] Fixed: Don't use extended episode number as release group --- .../ParserTests/ReleaseGroupParserFixture.cs | 1 + src/NzbDrone.Core/Parser/Parser.cs | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/src/NzbDrone.Core.Test/ParserTests/ReleaseGroupParserFixture.cs b/src/NzbDrone.Core.Test/ParserTests/ReleaseGroupParserFixture.cs index 6b96bceda..19b782040 100644 --- a/src/NzbDrone.Core.Test/ParserTests/ReleaseGroupParserFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/ReleaseGroupParserFixture.cs @@ -30,6 +30,7 @@ public class ReleaseGroupParserFixture : CoreTest [TestCase("Ghosted.S01E08.Haunted.Hayride.720p.AMZN.WEBRip.DDP5.1.x264-NTb-postbot", "NTb")] [TestCase("Ghosted.S01E08.Haunted.Hayride.720p.AMZN.WEBRip.DDP5.1.x264-NTb-xpost", "NTb")] [TestCase("Series Title - S01E01 - Episode Title [RlsGroup]", "RlsGroup")] + [TestCase("Black Monday S01 E01-E02 1080p AMZN WEBRip DDP5.1 x264 monkee", null)] //[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 4ffc20be3..58df4cc78 100644 --- a/src/NzbDrone.Core/Parser/Parser.cs +++ b/src/NzbDrone.Core/Parser/Parser.cs @@ -328,6 +328,10 @@ public static class Parser private static readonly Regex ReleaseGroupRegex = new Regex(@"-(?[a-z0-9]+)(?[a-z0-9]+)\]$", RegexOptions.IgnoreCase | RegexOptions.Compiled); + + private static readonly Regex InvalidReleaseGroupRegex = new Regex(@"^[se]\d+$", RegexOptions.IgnoreCase | RegexOptions.Compiled); + + private static readonly Regex AnimeReleaseGroupRegex = new Regex(@"^(?:\[(?(?!\s).+?(?