Fixed: Don't retry grabbing the same release if download client is unavailable

(cherry picked from commit b38c1255dc19d72ee10db4af67e76a4ce95f288f)

Closes #2520
This commit is contained in:
Mark McDowall
2023-05-20 20:51:24 -07:00
committed by Bogdan
parent 34f0c1820a
commit cb511dc19d
5 changed files with 31 additions and 8 deletions
@@ -6,6 +6,7 @@ using NzbDrone.Common.Http;
using NzbDrone.Common.Instrumentation.Extensions;
using NzbDrone.Common.TPL;
using NzbDrone.Core.Download.Clients;
using NzbDrone.Core.Download.Pending;
using NzbDrone.Core.Exceptions;
using NzbDrone.Core.Indexers;
using NzbDrone.Core.Messaging.Events;
@@ -54,7 +55,8 @@ namespace NzbDrone.Core.Download
Ensure.That(remoteBook.Books, () => remoteBook.Books).HasItems();
var downloadTitle = remoteBook.Release.Title;
var downloadClient = _downloadClientProvider.GetDownloadClient(remoteBook.Release.DownloadProtocol, remoteBook.Release.IndexerId);
var filterBlockedClients = remoteBook.Release.PendingReleaseReason == PendingReleaseReason.DownloadClientUnavailable;
var downloadClient = _downloadClientProvider.GetDownloadClient(remoteBook.Release.DownloadProtocol, remoteBook.Release.IndexerId, filterBlockedClients);
if (downloadClient == null)
{