From 8770f30b842a916664d624090341da068de7514b Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Wed, 7 Aug 2024 17:15:12 -0700 Subject: [PATCH] fixup! Fixed: Marking queued item as failed not blocking the correct Torrent Info Hash --- src/NzbDrone.Core/Blocklisting/BlocklistService.cs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/NzbDrone.Core/Blocklisting/BlocklistService.cs b/src/NzbDrone.Core/Blocklisting/BlocklistService.cs index 58018c7ba..28c33fd4c 100644 --- a/src/NzbDrone.Core/Blocklisting/BlocklistService.cs +++ b/src/NzbDrone.Core/Blocklisting/BlocklistService.cs @@ -186,7 +186,10 @@ namespace NzbDrone.Core.Blocklisting Indexer = message.Data.GetValueOrDefault("indexer"), Protocol = (DownloadProtocol)Convert.ToInt32(message.Data.GetValueOrDefault("protocol")), 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)) @@ -198,15 +201,6 @@ namespace NzbDrone.Core.Blocklisting { 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)