|
|
|
@ -342,8 +342,8 @@ namespace NzbDrone.Core.Parser
|
|
|
|
|
{
|
|
|
|
|
if (!ValidateBeforeParsing(title)) return null;
|
|
|
|
|
|
|
|
|
|
Logger.Debug("Parsing string '{0}'", title);
|
|
|
|
|
|
|
|
|
|
Logger.Debug("Parsing string '{0}' using search criteria artist: '{1}' album: '{2}'",
|
|
|
|
|
title, artist.Name, string.Join(", ", album.Select(a => a.Title)));
|
|
|
|
|
|
|
|
|
|
if (ReversedTitleRegex.IsMatch(title))
|
|
|
|
|
{
|
|
|
|
@ -363,8 +363,8 @@ namespace NzbDrone.Core.Parser
|
|
|
|
|
|
|
|
|
|
simpleTitle = CleanTorrentSuffixRegex.Replace(simpleTitle, string.Empty);
|
|
|
|
|
|
|
|
|
|
var escapedArtist = Regex.Escape(artist.Name);
|
|
|
|
|
var escapedAlbums = Regex.Escape(string.Join("|", album.Select(s => s.Title).ToList()));
|
|
|
|
|
var escapedArtist = Regex.Escape(artist.Name).Replace(@"\ ", @"[\W_]");
|
|
|
|
|
var escapedAlbums = Regex.Escape(string.Join("|", album.Select(s => s.Title).ToList())).Replace(@"\ ", @"[\W_]");;
|
|
|
|
|
|
|
|
|
|
var releaseRegex = new Regex(@"^(\W*|\b)(?<artist>" + escapedArtist + @")(\W*|\b).*(\W*|\b)(?<album>" + escapedAlbums + @")(\W*|\b)", RegexOptions.IgnoreCase);
|
|
|
|
|
|
|
|
|
|