From 097712f04fde2b6692d4b93a2659a28143c7f14b Mon Sep 17 00:00:00 2001 From: Qstick Date: Sun, 11 Dec 2022 23:42:13 -0600 Subject: [PATCH] Fixed: Clean Remaster from track titles prior to compare Some albums get stuck with import issues if they contain `remaster`. Clean this before running through the distance calc. --- src/NzbDrone.Core.Test/ParserTests/ParserFixture.cs | 1 + src/NzbDrone.Core/Parser/Parser.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core.Test/ParserTests/ParserFixture.cs b/src/NzbDrone.Core.Test/ParserTests/ParserFixture.cs index f4ab2f0ed..021681161 100644 --- a/src/NzbDrone.Core.Test/ParserTests/ParserFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/ParserFixture.cs @@ -71,6 +71,7 @@ namespace NzbDrone.Core.Test.ParserTests [TestCase("Alles Schon Gesehen (Feat. Deichkind)", "Alles Schon Gesehen")] [TestCase("Science Fiction/Double Feature", "Science Fiction/Double Feature")] [TestCase("Dancing Feathers", "Dancing Feathers")] + [TestCase("D.J. (2017 Remaster)", "D.J.")] public void should_remove_common_tags_from_track_title(string title, string correct) { var result = Parser.Parser.CleanTrackTitle(title); diff --git a/src/NzbDrone.Core/Parser/Parser.cs b/src/NzbDrone.Core/Parser/Parser.cs index cf1b81bfa..8d3b82d39 100644 --- a/src/NzbDrone.Core/Parser/Parser.cs +++ b/src/NzbDrone.Core/Parser/Parser.cs @@ -212,7 +212,7 @@ namespace NzbDrone.Core.Parser private static readonly Regex[] CommonTagRegex = new Regex[] { new Regex(@"(\[|\()*\b((featuring|feat.|feat|ft|ft.)\s{1}){1}\s*.*(\]|\))*", RegexOptions.IgnoreCase | RegexOptions.Compiled), - new Regex(@"(?:\(|\[)(?:[^\(\[]*)(?:version|limited|deluxe|single|clean|album|special|bonus|promo|remastered)(?:[^\)\]]*)(?:\)|\])", RegexOptions.IgnoreCase | RegexOptions.Compiled) + new Regex(@"(?:\(|\[)(?:[^\(\[]*)(?:version|limited|deluxe|single|clean|album|special|bonus|promo|remaster(ed)?)(?:[^\)\]]*)(?:\)|\])", RegexOptions.IgnoreCase | RegexOptions.Compiled) }; private static readonly Regex[] BracketRegex = new Regex[]