From e35f38fee68e48646b0e38e9c01ed6059c5241b7 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Fri, 12 May 2023 16:58:18 -0700 Subject: [PATCH] Fix function name and use out var for try get in DownloadClientProvider (cherry picked from commit a953d1a6c50bc1ee05a2fc4183d2b4d9aba5b586) --- src/NzbDrone.Core/Download/DownloadClientProvider.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/NzbDrone.Core/Download/DownloadClientProvider.cs b/src/NzbDrone.Core/Download/DownloadClientProvider.cs index 63af8f27f..df9249dcc 100644 --- a/src/NzbDrone.Core/Download/DownloadClientProvider.cs +++ b/src/NzbDrone.Core/Download/DownloadClientProvider.cs @@ -92,7 +92,7 @@ namespace NzbDrone.Core.Download if (filterBlockedClients) { - return FilterBlockedIndexers(enabledClients).ToList(); + return FilterBlockedDownloadClients(enabledClients).ToList(); } return enabledClients; @@ -103,15 +103,13 @@ namespace NzbDrone.Core.Download return _downloadClientFactory.GetAvailableProviders().Single(d => d.Definition.Id == id); } - private IEnumerable FilterBlockedIndexers(IEnumerable clients) + private IEnumerable FilterBlockedDownloadClients(IEnumerable clients) { var blockedClients = _downloadClientStatusService.GetBlockedProviders().ToDictionary(v => v.ProviderId, v => v); foreach (var client in clients) { - DownloadClientStatus blockedClientStatus; - - if (blockedClients.TryGetValue(client.Definition.Id, out blockedClientStatus)) + if (blockedClients.TryGetValue(client.Definition.Id, out var blockedClientStatus)) { _logger.Debug("Temporarily ignoring client {0} till {1} due to recent failures.", client.Definition.Name, blockedClientStatus.DisabledTill.Value.ToLocalTime()); continue;