fixup! Fixed: Marking queued item as failed not blocking the correct Torrent Info Hash

This commit is contained in:
Mark McDowall 2024-08-07 17:15:12 -07:00
parent fc29a10268
commit 8770f30b84
1 changed files with 4 additions and 10 deletions

View File

@ -186,7 +186,10 @@ namespace NzbDrone.Core.Blocklisting
Indexer = message.Data.GetValueOrDefault("indexer"), Indexer = message.Data.GetValueOrDefault("indexer"),
Protocol = (DownloadProtocol)Convert.ToInt32(message.Data.GetValueOrDefault("protocol")), Protocol = (DownloadProtocol)Convert.ToInt32(message.Data.GetValueOrDefault("protocol")),
Message = message.Message, Message = message.Message,
Languages = message.Languages Languages = message.Languages,
TorrentInfoHash = message.TrackedDownload?.Protocol == DownloadProtocol.Torrent
? message.TrackedDownload.DownloadItem.DownloadId
: message.Data.GetValueOrDefault("torrentInfoHash", null)
}; };
if (Enum.TryParse(message.Data.GetValueOrDefault("indexerFlags"), true, out IndexerFlags flags)) if (Enum.TryParse(message.Data.GetValueOrDefault("indexerFlags"), true, out IndexerFlags flags))
@ -198,15 +201,6 @@ namespace NzbDrone.Core.Blocklisting
{ {
blocklist.ReleaseType = releaseType; blocklist.ReleaseType = releaseType;
} }
if (message.TrackedDownload == null)
{
blocklist.TorrentInfoHash = message.Data.GetValueOrDefault("torrentInfoHash", null);
}
else
{
blocklist.TorrentInfoHash = message.TrackedDownload.Protocol == DownloadProtocol.Torrent ? message.TrackedDownload.DownloadItem.DownloadId : null;
}
} }
public void HandleAsync(SeriesDeletedEvent message) public void HandleAsync(SeriesDeletedEvent message)