|
|
@ -272,35 +272,39 @@ namespace NzbDrone.Core.Parser
|
|
|
|
if (trackInfo != null)
|
|
|
|
if (trackInfo != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
result.Add(trackInfo);
|
|
|
|
result.Add(trackInfo);
|
|
|
|
return result;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
_logger.Debug("Unable to find {0}", parsedTrackInfo);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
_logger.Debug("Track title search unsuccessful, falling back to track number for {1}", trackInfo, parsedTrackInfo);
|
|
|
|
//_logger.Debug("Track title search unsuccessful, falling back to track number for {1}", trackInfo, parsedTrackInfo);
|
|
|
|
|
|
|
|
|
|
|
|
if (parsedTrackInfo.TrackNumbers == null)
|
|
|
|
//if (parsedTrackInfo.TrackNumbers == null)
|
|
|
|
{
|
|
|
|
//{
|
|
|
|
_logger.Debug("Track has no track numbers: {1}", trackInfo, parsedTrackInfo);
|
|
|
|
// _logger.Debug("Track has no track numbers: {1}", trackInfo, parsedTrackInfo);
|
|
|
|
return new List<Track>();
|
|
|
|
// return new List<Track>();
|
|
|
|
}
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
foreach (var trackNumber in parsedTrackInfo.TrackNumbers)
|
|
|
|
//foreach (var trackNumber in parsedTrackInfo.TrackNumbers)
|
|
|
|
{
|
|
|
|
//{
|
|
|
|
Track trackInfoByNumber = null;
|
|
|
|
// Track trackInfoByNumber = null;
|
|
|
|
|
|
|
|
|
|
|
|
trackInfoByNumber = _trackService.FindTrack(artist.Id, album.Id, parsedTrackInfo.DiscNumber, trackNumber);
|
|
|
|
// trackInfoByNumber = _trackService.FindTrack(artist.Id, album.Id, parsedTrackInfo.DiscNumber, trackNumber);
|
|
|
|
_logger.Debug("Track {0} selected for {1}", trackInfoByNumber, parsedTrackInfo);
|
|
|
|
// _logger.Debug("Track {0} selected for {1}", trackInfoByNumber, parsedTrackInfo);
|
|
|
|
|
|
|
|
|
|
|
|
if (trackInfoByNumber != null)
|
|
|
|
// if (trackInfoByNumber != null)
|
|
|
|
{
|
|
|
|
// {
|
|
|
|
result.Add(trackInfoByNumber);
|
|
|
|
// result.Add(trackInfoByNumber);
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
// else
|
|
|
|
{
|
|
|
|
// {
|
|
|
|
_logger.Debug("Unable to find {0}", parsedTrackInfo);
|
|
|
|
// _logger.Debug("Unable to find {0}", parsedTrackInfo);
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|