Blocklist Torrent Hash should prefer getting the hash (DownloadId) from the tracked download item, if available, and fall back to the history item only if the tracked item is unavailable

This commit is contained in:
Hossy 2024-08-07 19:05:47 -05:00
commit a872e57429

View file

@ -185,7 +185,7 @@ namespace NzbDrone.Core.Blocklisting
Indexer = message.Data.GetValueOrDefault("indexer"),
Protocol = (DownloadProtocol)Convert.ToInt32(message.Data.GetValueOrDefault("protocol")),
Message = message.Message,
TorrentInfoHash = message.Data.GetValueOrDefault("torrentInfoHash")
TorrentInfoHash = message.TrackedDownload == null ? message.Data.GetValueOrDefault("torrentInfoHash") : message.TrackedDownload.DownloadItem.DownloadId
};
if (Enum.TryParse(message.Data.GetValueOrDefault("indexerFlags"), true, out IndexerFlags flags))