From e50e79167acfb5a8fc4a76a1ca95285616142eeb Mon Sep 17 00:00:00 2001 From: Bogdan Date: Thu, 31 Oct 2024 10:57:43 +0200 Subject: [PATCH] =?UTF-8?q?Fixed:=20Cleaning=20the=20French=20preposition?= =?UTF-8?q?=20'=C3=A0'=20from=20names?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 22005dc8c500cd77e4a710248582cd4a0036988f) Closes #5213 --- src/NzbDrone.Core.Test/ParserTests/NormalizeTitleFixture.cs | 2 ++ src/NzbDrone.Core/Parser/Parser.cs | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/NzbDrone.Core.Test/ParserTests/NormalizeTitleFixture.cs b/src/NzbDrone.Core.Test/ParserTests/NormalizeTitleFixture.cs index 8099c0973..bb5559297 100644 --- a/src/NzbDrone.Core.Test/ParserTests/NormalizeTitleFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/NormalizeTitleFixture.cs @@ -24,6 +24,8 @@ namespace NzbDrone.Core.Test.ParserTests [TestCase("test/test", "testtest")] [TestCase("90210", "90210")] [TestCase("24", "24")] + [TestCase("Test: Something à Deux", "testsomethingdeux")] + [TestCase("Parler à", "parlera")] public void should_remove_special_characters_and_casing(string dirty, string clean) { var result = dirty.CleanArtistName(); diff --git a/src/NzbDrone.Core/Parser/Parser.cs b/src/NzbDrone.Core/Parser/Parser.cs index 9210b738a..382b33d7f 100644 --- a/src/NzbDrone.Core/Parser/Parser.cs +++ b/src/NzbDrone.Core/Parser/Parser.cs @@ -154,7 +154,7 @@ namespace NzbDrone.Core.Parser new Regex(@"^b00bs$", RegexOptions.Compiled | RegexOptions.IgnoreCase) }; - private static readonly RegexReplace NormalizeRegex = new RegexReplace(@"((?:\b|_)(?