mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-21 22:04:31 -04:00
* Implemented parsing case for Artist - Year - Album * Enhanced test case to ensure year and artist also parse correctly. Closes #264
This commit is contained in:
@@ -115,10 +115,17 @@ namespace NzbDrone.Core.Parser
|
||||
new Regex(@"^(?:(?<artist>.+?)(?:-)+)(?<album>.+?)(?:-.+?)(?<releaseyear>\d{4})",
|
||||
RegexOptions.IgnoreCase | RegexOptions.Compiled),
|
||||
|
||||
//Artist - Year - Album
|
||||
// Hypen with no or more spaces between artist/album/year (must be before Artist-Album Year as that catches this case)
|
||||
new Regex(@"^(?:(?<artist>.+?)\s*(?:-)+)\s*(?<releaseyear>\d{4})\s*(?:-+)\s*(?<album>.+)",
|
||||
RegexOptions.IgnoreCase | RegexOptions.Compiled),
|
||||
|
||||
//Artist-Album Year
|
||||
//Hyphen no space between artist and album
|
||||
new Regex(@"^(?:(?<artist>.+?)(?:-)+)(?<album>.+?)\W*(?<releaseyear>\d{4})",
|
||||
RegexOptions.IgnoreCase | RegexOptions.Compiled),
|
||||
|
||||
|
||||
};
|
||||
|
||||
private static readonly Regex[] RejectHashedReleasesRegex = new Regex[]
|
||||
|
||||
Reference in New Issue
Block a user