From a06cbc44cd522d96365b24defe6b0ae7a88f399c Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Fri, 3 May 2019 20:14:35 -0700 Subject: [PATCH] Fixed: Ignore episode title when parsing release group Fixes #3097 --- 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 bd78178d6..5c47a0631 100644 --- a/src/NzbDrone.Core.Test/ParserTests/ReleaseGroupParserFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/ReleaseGroupParserFixture.cs @@ -36,6 +36,8 @@ public class ReleaseGroupParserFixture : CoreTest [TestCase("The.Walking.Dead.S09E12.Guardians.REPACK.1080p.AMZN.WEB-DL.DD.5.1.H.264-CasStudio-BUYMORE", "CasStudio")] [TestCase("Series Title - S01E01 - Episode Title [RlsGroup]", "RlsGroup")] [TestCase("Black Monday S01 E01-E02 1080p AMZN WEBRip DDP5.1 x264 monkee", null)] + [TestCase("Series.Title.S01E05.The-Aniversary.WEBDL-1080p.mkv", null)] + [TestCase("Series.Title.S01E05.The-Aniversary.HDTV-1080p.mkv", 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 fb9cd25e0..9fde1b559 100644 --- a/src/NzbDrone.Core/Parser/Parser.cs +++ b/src/NzbDrone.Core/Parser/Parser.cs @@ -348,7 +348,7 @@ public static class 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]+)\]$", + private static readonly Regex ReleaseGroupRegex = new Regex(@"-(?[a-z0-9]+(?!.+?(?:480p|720p|1080p|2160p)))(?[a-z0-9]+)\]$", RegexOptions.IgnoreCase | RegexOptions.Compiled);