From 3bbec2ff5d60ad078afb786541b33116b7439629 Mon Sep 17 00:00:00 2001 From: bakerboy448 <55419169+bakerboy448@users.noreply.github.com> Date: Sun, 1 Aug 2021 15:30:33 -0500 Subject: [PATCH] Fixed: Incorrectly Parsing [PublicHD] as Release Group --- .../ParserTests/ReleaseGroupParserFixture.cs | 1 + src/NzbDrone.Core/Parser/Parser.cs | 3 ++- 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 65d614f09..e60dba77a 100644 --- a/src/NzbDrone.Core.Test/ParserTests/ReleaseGroupParserFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/ReleaseGroupParserFixture.cs @@ -37,6 +37,7 @@ namespace NzbDrone.Core.Test.ParserTests [TestCase("SomeShow.S20E13.1080p.BluRay.DTS-MA.5.1.x264",null)] [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("", "")] 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 6d435af76..25b95d24e 100644 --- a/src/NzbDrone.Core/Parser/Parser.cs +++ b/src/NzbDrone.Core/Parser/Parser.cs @@ -416,7 +416,7 @@ namespace NzbDrone.Core.Parser string.Empty, RegexOptions.IgnoreCase | RegexOptions.Compiled); - private static readonly RegexReplace CleanTorrentSuffixRegex = new RegexReplace(@"\[(?:ettv|rartv|rarbg|cttv)\]$", + private static readonly RegexReplace CleanTorrentSuffixRegex = new RegexReplace(@"\[(?:ettv|rartv|rarbg|cttv|publichd)\]$", string.Empty, RegexOptions.IgnoreCase | RegexOptions.Compiled); @@ -693,6 +693,7 @@ namespace NzbDrone.Core.Parser break; } title = WebsitePrefixRegex.Replace(title); + title = CleanTorrentSuffixRegex.Replace(title); var animeMatch = AnimeReleaseGroupRegex.Match(title);