1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-18 21:35:27 -04:00

Fixed: Rejected Imports with no associated release or indexer

This commit is contained in:
Stevie Robinson
2025-02-19 04:26:38 +01:00
committed by Mark McDowall
parent 4e65669c48
commit b7407837b7
@@ -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))
{