From a86bd8e862ebe265efdc44fb7383834edc775e07 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Tue, 11 Mar 2025 18:09:19 +0200 Subject: [PATCH] Fixed: Inherit indexer, size and release group for marked as failed history (cherry picked from commit e08c9d5501e65aabce3456b2dd7571867508d88f) --- src/NzbDrone.Core/History/EntityHistory.cs | 3 +++ src/NzbDrone.Core/History/EntityHistoryService.cs | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/History/EntityHistory.cs b/src/NzbDrone.Core/History/EntityHistory.cs index ffc7e8e7c..496213275 100644 --- a/src/NzbDrone.Core/History/EntityHistory.cs +++ b/src/NzbDrone.Core/History/EntityHistory.cs @@ -10,6 +10,9 @@ namespace NzbDrone.Core.History { public const string DOWNLOAD_CLIENT = "downloadClient"; public const string RELEASE_SOURCE = "releaseSource"; + public const string RELEASE_GROUP = "releaseGroup"; + public const string SIZE = "size"; + public const string INDEXER = "indexer"; public EntityHistory() { diff --git a/src/NzbDrone.Core/History/EntityHistoryService.cs b/src/NzbDrone.Core/History/EntityHistoryService.cs index d94d0cf9e..d88358ddb 100644 --- a/src/NzbDrone.Core/History/EntityHistoryService.cs +++ b/src/NzbDrone.Core/History/EntityHistoryService.cs @@ -267,7 +267,9 @@ namespace NzbDrone.Core.History history.Data.Add("DownloadClient", message.DownloadClient); history.Data.Add("Message", message.Message); - history.Data.Add("Size", message.TrackedDownload?.DownloadItem.TotalSize.ToString()); + history.Data.Add("ReleaseGroup", message.TrackedDownload?.RemoteAlbum?.ParsedAlbumInfo?.ReleaseGroup ?? message.Data.GetValueOrDefault(EntityHistory.RELEASE_GROUP)); + history.Data.Add("Size", message.TrackedDownload?.DownloadItem.TotalSize.ToString() ?? message.Data.GetValueOrDefault(EntityHistory.SIZE)); + history.Data.Add("Indexer", message.TrackedDownload?.RemoteAlbum?.Release?.Indexer ?? message.Data.GetValueOrDefault(EntityHistory.INDEXER)); _historyRepository.Insert(history); } @@ -417,6 +419,7 @@ namespace NzbDrone.Core.History history.Data.Add("Message", message.Message); history.Data.Add("ReleaseGroup", message.TrackedDownload?.RemoteAlbum?.ParsedAlbumInfo?.ReleaseGroup); history.Data.Add("Size", message.TrackedDownload?.DownloadItem.TotalSize.ToString()); + history.Data.Add("Indexer", message.TrackedDownload?.RemoteAlbum?.Release?.Indexer); historyToAdd.Add(history); }