mirror of https://github.com/lidarr/Lidarr
Fixed: Don't import based on track number alone.
This commit is contained in:
parent
1368dd6a53
commit
bc8bd9995a
|
@ -272,36 +272,40 @@ namespace NzbDrone.Core.Parser
|
|||
if (trackInfo != null)
|
||||
{
|
||||
result.Add(trackInfo);
|
||||
return result;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
_logger.Debug("Track title search unsuccessful, falling back to track number for {1}", trackInfo, parsedTrackInfo);
|
||||
|
||||
if (parsedTrackInfo.TrackNumbers == null)
|
||||
{
|
||||
_logger.Debug("Track has no track numbers: {1}", trackInfo, parsedTrackInfo);
|
||||
return new List<Track>();
|
||||
}
|
||||
|
||||
foreach (var trackNumber in parsedTrackInfo.TrackNumbers)
|
||||
{
|
||||
Track trackInfoByNumber = null;
|
||||
|
||||
trackInfoByNumber = _trackService.FindTrack(artist.Id, album.Id, parsedTrackInfo.DiscNumber, trackNumber);
|
||||
_logger.Debug("Track {0} selected for {1}", trackInfoByNumber, parsedTrackInfo);
|
||||
|
||||
if (trackInfoByNumber != null)
|
||||
{
|
||||
result.Add(trackInfoByNumber);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
_logger.Debug("Unable to find {0}", parsedTrackInfo);
|
||||
}
|
||||
}
|
||||
|
||||
//_logger.Debug("Track title search unsuccessful, falling back to track number for {1}", trackInfo, parsedTrackInfo);
|
||||
|
||||
//if (parsedTrackInfo.TrackNumbers == null)
|
||||
//{
|
||||
// _logger.Debug("Track has no track numbers: {1}", trackInfo, parsedTrackInfo);
|
||||
// return new List<Track>();
|
||||
//}
|
||||
|
||||
//foreach (var trackNumber in parsedTrackInfo.TrackNumbers)
|
||||
//{
|
||||
// Track trackInfoByNumber = null;
|
||||
|
||||
// trackInfoByNumber = _trackService.FindTrack(artist.Id, album.Id, parsedTrackInfo.DiscNumber, trackNumber);
|
||||
// _logger.Debug("Track {0} selected for {1}", trackInfoByNumber, parsedTrackInfo);
|
||||
|
||||
// if (trackInfoByNumber != null)
|
||||
// {
|
||||
// result.Add(trackInfoByNumber);
|
||||
// }
|
||||
|
||||
// else
|
||||
// {
|
||||
// _logger.Debug("Unable to find {0}", parsedTrackInfo);
|
||||
// }
|
||||
//}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue