From ab264b3c06ef89eac7e6f01edb8c6a5dec643475 Mon Sep 17 00:00:00 2001 From: Taloth Saldono Date: Tue, 14 Oct 2014 22:21:51 +0200 Subject: [PATCH] Should no longer log error if download client was removed/disabled between CDH updates. --- src/NzbDrone.Core/Download/DownloadTrackingService.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/Download/DownloadTrackingService.cs b/src/NzbDrone.Core/Download/DownloadTrackingService.cs index c3ae2e756..6c75cf476 100644 --- a/src/NzbDrone.Core/Download/DownloadTrackingService.cs +++ b/src/NzbDrone.Core/Download/DownloadTrackingService.cs @@ -199,7 +199,13 @@ private void ProcessTrackedDownloads() foreach (var trackedDownload in trackedDownloads) { - var downloadClient = downloadClients.Single(v => v.Definition.Id == trackedDownload.DownloadClient); + var downloadClient = downloadClients.SingleOrDefault(v => v.Definition.Id == trackedDownload.DownloadClient); + + if (downloadClient == null) + { + _logger.Debug("TrackedDownload for unknown download client, download client was probably removed or disabled between scans."); + continue; + } var state = trackedDownload.State;