mirror of
https://github.com/Lidarr/Lidarr
synced 2026-01-01 05:05:42 +01:00
Added: Parser case for Artist - Album - Year [Other]
This commit is contained in:
parent
499af45566
commit
c3d2769d3f
2 changed files with 7 additions and 0 deletions
|
|
@ -167,6 +167,9 @@ public void should_parse_album(string title, string correctAlbum, string correct
|
|||
//[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)
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -88,6 +88,10 @@ public static class Parser
|
|||
new Regex(@"^(?:(?<artist>.+?)(?: - )+)(?<album>.+?)\W*(?:\(|\[)(?<releaseyear>\d{4})",
|
||||
RegexOptions.IgnoreCase | RegexOptions.Compiled),
|
||||
|
||||
//Artist - Album - Year [something]
|
||||
new Regex(@"^(?:(?<artist>.+?)(?: - )+)(?<album>.+?)\W*(?: - )(?<releaseyear>\d{4})\W*(?:\(|\[)",
|
||||
RegexOptions.IgnoreCase | RegexOptions.Compiled),
|
||||
|
||||
//Artist - Album [something] or Artist - Album (something)
|
||||
new Regex(@"^(?:(?<artist>.+?)(?: - )+)(?<album>.+?)\W*(?:\(|\[)",
|
||||
RegexOptions.IgnoreCase | RegexOptions.Compiled),
|
||||
|
|
|
|||
Loading…
Reference in a new issue