From d7aea82e45a7c5fec9e72b534fc4c9fb8654c519 Mon Sep 17 00:00:00 2001 From: bakerboy448 <55419169+bakerboy448@users.noreply.github.com> Date: Sat, 27 Jan 2024 11:56:08 -0600 Subject: [PATCH] Improve Release Grabbing & Failure Logging --- .../Download/ProcessDownloadDecisions.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/NzbDrone.Core/Download/ProcessDownloadDecisions.cs b/src/NzbDrone.Core/Download/ProcessDownloadDecisions.cs index 640e67582..b59812d69 100644 --- a/src/NzbDrone.Core/Download/ProcessDownloadDecisions.cs +++ b/src/NzbDrone.Core/Download/ProcessDownloadDecisions.cs @@ -196,31 +196,30 @@ namespace NzbDrone.Core.Download private async Task ProcessDecisionInternal(DownloadDecision decision, int? downloadClientId = null) { var remoteEpisode = decision.RemoteEpisode; + var remoteIndexer = remoteEpisode.Release.Indexer; try { - _logger.Trace("Grabbing from Indexer {0} at priority {1}.", remoteEpisode.Release.Indexer, remoteEpisode.Release.IndexerPriority); + _logger.Trace("Grabbing release '{0}' from Indexer {1} at priority {2}.", remoteEpisode, remoteIndexer, remoteEpisode.Release.IndexerPriority); await _downloadService.DownloadReport(remoteEpisode, downloadClientId); return ProcessedDecisionResult.Grabbed; } catch (ReleaseUnavailableException) { - _logger.Warn("Failed to download release from indexer, no longer available. " + remoteEpisode); + _logger.Warn("Failed to download release '{0}' from Indexer {1}. Release not available", remoteEpisode, remoteIndexer); return ProcessedDecisionResult.Rejected; } catch (Exception ex) { if (ex is DownloadClientUnavailableException || ex is DownloadClientAuthenticationException) { - _logger.Debug(ex, - "Failed to send release to download client, storing until later. " + remoteEpisode); - + _logger.Debug(ex, "Failed to send release '{0}' from Indexer {1} to download client, storing until later.", remoteEpisode, remoteIndexer); return ProcessedDecisionResult.Failed; } else { - _logger.Warn(ex, "Couldn't add report to download queue. " + remoteEpisode); + _logger.Warn(ex, "Couldn't add release '{0}' from Indexer {1} to download queue.", remoteEpisode, remoteIndexer); return ProcessedDecisionResult.Skipped; } }