|
|
|
@ -194,31 +194,31 @@ namespace NzbDrone.Core.Download
|
|
|
|
|
private async Task<ProcessedDecisionResult> ProcessDecisionInternal(DownloadDecision decision, int? downloadClientId = null)
|
|
|
|
|
{
|
|
|
|
|
var remoteMovie = decision.RemoteMovie;
|
|
|
|
|
var remoteIndexer = remoteMovie.Release.Indexer;
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
_logger.Trace("Grabbing from Indexer {0} at priority {1}.", remoteMovie.Release.Indexer, remoteMovie.Release.IndexerPriority);
|
|
|
|
|
_logger.Trace("Grabbing release '{0}' from Indexer {1} at priority {2}.", remoteMovie, remoteIndexer, remoteMovie.Release.IndexerPriority);
|
|
|
|
|
await _downloadService.DownloadReport(remoteMovie, downloadClientId);
|
|
|
|
|
|
|
|
|
|
return ProcessedDecisionResult.Grabbed;
|
|
|
|
|
}
|
|
|
|
|
catch (ReleaseUnavailableException)
|
|
|
|
|
{
|
|
|
|
|
_logger.Warn("Failed to download release from indexer, no longer available. " + remoteMovie);
|
|
|
|
|
_logger.Warn("Failed to download release '{0}' from Indexer {1}. Release not available", remoteMovie, 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. " + remoteMovie);
|
|
|
|
|
_logger.Debug(ex, "Failed to send release '{0}' from Indexer {1} to download client, storing until later.", remoteMovie, remoteIndexer);
|
|
|
|
|
|
|
|
|
|
return ProcessedDecisionResult.Failed;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
_logger.Warn(ex, "Couldn't add report to download queue. " + remoteMovie);
|
|
|
|
|
_logger.Warn(ex, "Couldn't add release '{0}' from Indexer {1} to download queue.", remoteMovie, remoteIndexer);
|
|
|
|
|
return ProcessedDecisionResult.Skipped;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|