mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-04-22 21:37:12 -04:00
Fixed: Rejected Imports with no associated release or indexer
This commit is contained in:
parent
b122ee9670
commit
31e02bdead
1 changed files with 7 additions and 1 deletions
|
@ -22,7 +22,7 @@ public class RejectedImportService : IRejectedImportService
|
|||
|
||||
public bool Process(TrackedDownload trackedDownload, ImportResult importResult)
|
||||
{
|
||||
if (importResult.Result != ImportResultType.Rejected || importResult.ImportDecision.LocalEpisode == null)
|
||||
if (importResult.Result != ImportResultType.Rejected || importResult.ImportDecision.LocalEpisode == null || trackedDownload.RemoteEpisode?.Release == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -30,6 +30,12 @@ public class RejectedImportService : IRejectedImportService
|
|||
var indexerSettings = _cachedIndexerSettingsProvider.GetSettings(trackedDownload.RemoteEpisode.Release.IndexerId);
|
||||
var rejectionReason = importResult.ImportDecision.Rejections.FirstOrDefault()?.Reason;
|
||||
|
||||
if (indexerSettings == null)
|
||||
{
|
||||
trackedDownload.Warn(new TrackedDownloadStatusMessage(importResult.Errors.First(), new List<string>()));
|
||||
return true;
|
||||
}
|
||||
|
||||
if (rejectionReason == ImportRejectionReason.DangerousFile &&
|
||||
indexerSettings.FailDownloads.Contains(FailDownloads.PotentiallyDangerous))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue