From bb4e185644cdd484e540adf6151ff2cf03a32a4c Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Fri, 21 Jun 2024 17:10:58 -0700 Subject: [PATCH] New: Remove websites in parentheses before parsing (cherry picked from commit ea4fe392a0cc4774bb28c969fb3903db264c8d6c) Closes #10114 --- src/NzbDrone.Core.Test/ParserTests/UrlFixture.cs | 1 + src/NzbDrone.Core/Parser/Parser.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core.Test/ParserTests/UrlFixture.cs b/src/NzbDrone.Core.Test/ParserTests/UrlFixture.cs index e99c6a4190..f261531a0b 100644 --- a/src/NzbDrone.Core.Test/ParserTests/UrlFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/UrlFixture.cs @@ -22,6 +22,7 @@ public class UrlFixture : CoreTest [TestCase("[www.test-hyphen.ca] - Movie Title (2023)", "Movie Title")] [TestCase("test123.ca - Movie Time 2023 720p HDTV x264 CRON", "Movie Time")] [TestCase("[www.test-hyphen123.co.za] - Movie Title 2023", "Movie Title")] + [TestCase("(movieawake.com) Movie Title 2023 [720p] [English Subbed]", "Movie Title")] public void should_not_parse_url_in_name(string postTitle, string title) { var result = Parser.Parser.ParseMovieTitle(postTitle).MovieTitle.CleanMovieTitle(); diff --git a/src/NzbDrone.Core/Parser/Parser.cs b/src/NzbDrone.Core/Parser/Parser.cs index 16ac26c9d5..918e5f8761 100644 --- a/src/NzbDrone.Core/Parser/Parser.cs +++ b/src/NzbDrone.Core/Parser/Parser.cs @@ -121,7 +121,7 @@ public static class Parser private static readonly Regex SimpleReleaseTitleRegex = new Regex(@"\s*(?:[<>?*|])", RegexOptions.Compiled | RegexOptions.IgnoreCase); // Valid TLDs http://data.iana.org/TLD/tlds-alpha-by-domain.txt - private static readonly RegexReplace WebsitePrefixRegex = new RegexReplace(@"^(?:\[\s*)?(?:www\.)?[-a-z0-9-]{1,256}\.(?