mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-04-24 06:17:08 -04:00
Improve messaging on indexer specified download client is not available
This commit is contained in:
parent
ed27bcf213
commit
84e657482d
1 changed files with 8 additions and 3 deletions
|
@ -59,13 +59,18 @@ namespace NzbDrone.Core.Download
|
|||
{
|
||||
var indexer = _indexerFactory.Find(indexerId);
|
||||
|
||||
if (indexer != null && indexer.DownloadClientId > 0)
|
||||
if (indexer is { DownloadClientId: > 0 })
|
||||
{
|
||||
var client = availableProviders.SingleOrDefault(d => d.Definition.Id == indexer.DownloadClientId);
|
||||
|
||||
if (client == null || (filterBlockedClients && blockedProviders.Contains(client.Definition.Id)))
|
||||
if (client == null)
|
||||
{
|
||||
throw new DownloadClientUnavailableException($"Indexer specified download client is not available");
|
||||
throw new DownloadClientUnavailableException($"Indexer specified download client does not exist for {indexer.Name}");
|
||||
}
|
||||
|
||||
if (filterBlockedClients && blockedProviders.Contains(client.Definition.Id))
|
||||
{
|
||||
throw new DownloadClientUnavailableException($"Indexer specified download client is not available due to recent failures for {indexer.Name}");
|
||||
}
|
||||
|
||||
return client;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue