Fixed: (Parser) Strip produced by from track titles

This commit is contained in:
Bogdan 2023-07-14 23:39:29 +03:00
commit 81870ea481
2 changed files with 3 additions and 1 deletions

View file

@ -72,6 +72,8 @@ namespace NzbDrone.Core.Test.ParserTests
[TestCase("Science Fiction/Double Feature", "Science Fiction/Double Feature")] [TestCase("Science Fiction/Double Feature", "Science Fiction/Double Feature")]
[TestCase("Dancing Feathers", "Dancing Feathers")] [TestCase("Dancing Feathers", "Dancing Feathers")]
[TestCase("D.J. (2017 Remaster)", "D.J.")] [TestCase("D.J. (2017 Remaster)", "D.J.")]
[TestCase("The Kiss (Skit) (Produced By Eminem)", "The Kiss (Skit)")]
[TestCase("Without Me (Produced By Eminem & Jeff Bass)", "Without Me")]
public void should_remove_common_tags_from_track_title(string title, string correct) public void should_remove_common_tags_from_track_title(string title, string correct)
{ {
var result = Parser.Parser.CleanTrackTitle(title); var result = Parser.Parser.CleanTrackTitle(title);

View file

@ -217,7 +217,7 @@ namespace NzbDrone.Core.Parser
private static readonly Regex[] CommonTagRegex = new Regex[] 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(@"(\[|\()*\b((featuring|feat.|feat|ft|ft.|produced by)\s{1}){1}\s*.*(\]|\))*", RegexOptions.IgnoreCase | RegexOptions.Compiled),
new Regex(@"(?:\(|\[)(?:[^\(\[]*)(?:version|limited|deluxe|single|clean|album|special|bonus|promo|remaster(ed)?)(?:[^\)\]]*)(?:\)|\])", RegexOptions.IgnoreCase | RegexOptions.Compiled) new Regex(@"(?:\(|\[)(?:[^\(\[]*)(?:version|limited|deluxe|single|clean|album|special|bonus|promo|remaster(ed)?)(?:[^\)\]]*)(?:\)|\])", RegexOptions.IgnoreCase | RegexOptions.Compiled)
}; };