From bc8bd9995a4370dbdcb14c4aa7a224bc1dc46bf5 Mon Sep 17 00:00:00 2001 From: Qstick Date: Thu, 28 Dec 2017 22:03:41 -0500 Subject: [PATCH] Fixed: Don't import based on track number alone. --- src/NzbDrone.Core/Parser/ParsingService.cs | 46 ++++++++++++---------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/src/NzbDrone.Core/Parser/ParsingService.cs b/src/NzbDrone.Core/Parser/ParsingService.cs index 397de7bf4..63752d127 100644 --- a/src/NzbDrone.Core/Parser/ParsingService.cs +++ b/src/NzbDrone.Core/Parser/ParsingService.cs @@ -272,35 +272,39 @@ namespace NzbDrone.Core.Parser if (trackInfo != null) { 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) - { - _logger.Debug("Track has no track numbers: {1}", trackInfo, parsedTrackInfo); - return new List(); - } + //if (parsedTrackInfo.TrackNumbers == null) + //{ + // _logger.Debug("Track has no track numbers: {1}", trackInfo, parsedTrackInfo); + // return new List(); + //} - foreach (var trackNumber in parsedTrackInfo.TrackNumbers) - { - Track trackInfoByNumber = null; + //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); + // 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); - } + // if (trackInfoByNumber != null) + // { + // result.Add(trackInfoByNumber); + // } - else - { - _logger.Debug("Unable to find {0}", parsedTrackInfo); - } - } + // else + // { + // _logger.Debug("Unable to find {0}", parsedTrackInfo); + // } + //} return result; }