Add logging

pull/9942/head
Bogdan 4 weeks ago
parent a0f39293a8
commit 9d88892abf

@ -205,10 +205,12 @@ namespace NzbDrone.Core.Download
if (actualHash.IsNotNullOrWhiteSpace() && hash != actualHash)
{
_logger.Debug(
"{0} did not return the expected InfoHash for '{1}', Radarr could potentially lose track of the download in progress.",
_logger.Warn(
"{0} did not return the expected InfoHash for '{1}', Radarr could potentially lose track of the download in progress. Expected '{2}', got '{3}'.",
Definition.Implementation,
remoteMovie.Release.DownloadUrl);
remoteMovie.Release.DownloadUrl,
hash,
actualHash);
}
return actualHash;

@ -1,3 +1,4 @@
using NLog;
using NzbDrone.Core.Download;
using NzbDrone.Core.Download.History;
using NzbDrone.Core.Parser;
@ -12,10 +13,12 @@ namespace NzbDrone.Core.MediaFiles.MovieImport.Aggregation.Aggregators.Augmenter
public string Name => "ReleaseName";
private readonly IDownloadHistoryService _downloadHistoryService;
private readonly ILogger _logger;
public AugmentQualityFromReleaseName(IDownloadHistoryService downloadHistoryService)
public AugmentQualityFromReleaseName(IDownloadHistoryService downloadHistoryService, Logger logger)
{
_downloadHistoryService = downloadHistoryService;
_logger = logger;
}
public AugmentQualityResult AugmentQuality(LocalMovie localMovie, DownloadClientItem downloadClientItem)
@ -26,12 +29,17 @@ namespace NzbDrone.Core.MediaFiles.MovieImport.Aggregation.Aggregators.Augmenter
return null;
}
_logger.Warn("Attempt to augment quality for Download ID '{0}'", downloadClientItem.DownloadId);
var history = _downloadHistoryService.GetLatestGrab(downloadClientItem.DownloadId);
if (history == null)
{
_logger.Warn("No grabbed history found for '{0}'", downloadClientItem.DownloadId);
return null;
}
_logger.Warn("Attempt to augment quality for release title '{0}'", history.SourceTitle);
var historyQuality = QualityParser.ParseQuality(history.SourceTitle);
var sourceConfidence = historyQuality.SourceDetectionSource == QualityDetectionSource.Name

Loading…
Cancel
Save