diff --git a/src/NzbDrone.Core.Test/ParserTests/ParserFixture.cs b/src/NzbDrone.Core.Test/ParserTests/ParserFixture.cs index f0833dd48..df872b931 100644 --- a/src/NzbDrone.Core.Test/ParserTests/ParserFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/ParserFixture.cs @@ -167,6 +167,9 @@ namespace NzbDrone.Core.Test.ParserTests //[TestCase("(R'n'B / Soul) Moyton - One of the Sta(2014) + Ocean(2014), MP3, 320 kbps", "Moyton", "")] [TestCase("(Heavy Metal) Aria - Discography(46 CD) [1985 - 2015], FLAC(image + .cue), lossless", "Aria", "Discography", true)] [TestCase("(Heavy Metal) [CD] Forces United - Discography(6 CDs), 2014-2016, FLAC(image + .cue), lossless", "Forces United", "Discography", true)] + [TestCase("Gorillaz - The now now - 2018 [FLAC]", "Gorillaz", "The now now")] + //Regex Works on below, but ParseAlbumMatchCollection cleans the "..." and converts it to spaces + [TestCase("Metallica - ...And Justice for All (1988) [FLAC Lossless]", "Metallica", "...And Justice for All")] public void should_parse_artist_name_and_album_title(string postTitle, string name, string title, bool discography = false) { diff --git a/src/NzbDrone.Core/Parser/Parser.cs b/src/NzbDrone.Core/Parser/Parser.cs index 35ac2f8c1..9b48558a2 100644 --- a/src/NzbDrone.Core/Parser/Parser.cs +++ b/src/NzbDrone.Core/Parser/Parser.cs @@ -88,6 +88,10 @@ namespace NzbDrone.Core.Parser new Regex(@"^(?:(?.+?)(?: - )+)(?.+?)\W*(?:\(|\[)(?\d{4})", RegexOptions.IgnoreCase | RegexOptions.Compiled), + //Artist - Album - Year [something] + new Regex(@"^(?:(?.+?)(?: - )+)(?.+?)\W*(?: - )(?\d{4})\W*(?:\(|\[)", + RegexOptions.IgnoreCase | RegexOptions.Compiled), + //Artist - Album [something] or Artist - Album (something) new Regex(@"^(?:(?.+?)(?: - )+)(?.+?)\W*(?:\(|\[)", RegexOptions.IgnoreCase | RegexOptions.Compiled),