Changed: Added "Remastered" to album cleaning regex

pull/6/head
Qstick 6 years ago
parent eadd6996ef
commit b7fe4193f3

@ -59,6 +59,7 @@ namespace NzbDrone.Core.Test.ParserTests
[TestCase("Sweet Dreams (Album)", "Sweet Dreams")] [TestCase("Sweet Dreams (Album)", "Sweet Dreams")]
[TestCase("Now What?! (Limited Edition)", "Now What?!")] [TestCase("Now What?! (Limited Edition)", "Now What?!")]
[TestCase("Random Album Title (Promo CD)", "Random Album Title")] [TestCase("Random Album Title (Promo CD)", "Random Album Title")]
[TestCase("Hello, I Must Be Going (2016 Remastered)", "Hello, I Must Be Going")]
[TestCase("Limited Edition", "Limited Edition")] [TestCase("Limited Edition", "Limited Edition")]
public void should_remove_common_tags_from_album_title(string title, string correct) public void should_remove_common_tags_from_album_title(string title, string correct)
{ {

@ -206,7 +206,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.)\s{1}){1}\s*.*(\]|\))*", RegexOptions.IgnoreCase | RegexOptions.Compiled),
new Regex(@"(?:\(|\[)(?:[^\(\[]*)(?:version|limited|deluxe|single|clean|album|special|bonus|promo)(?:[^\)\]]*)(?:\)|\])", RegexOptions.IgnoreCase | RegexOptions.Compiled) new Regex(@"(?:\(|\[)(?:[^\(\[]*)(?:version|limited|deluxe|single|clean|album|special|bonus|promo|remastered)(?:[^\)\]]*)(?:\)|\])", RegexOptions.IgnoreCase | RegexOptions.Compiled)
}; };
public static ParsedTrackInfo ParseMusicPath(string path) public static ParsedTrackInfo ParseMusicPath(string path)

Loading…
Cancel
Save