From fdc6526add9786c7a7af3fb0de5cda41df758156 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sat, 20 Jan 2024 16:26:19 -0800 Subject: [PATCH] New: Add size to more history events (cherry picked from commit 0d064181941fc6d149fc2f891661e059758d5428) Closes #4500 --- src/NzbDrone.Core/History/EntityHistoryService.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/History/EntityHistoryService.cs b/src/NzbDrone.Core/History/EntityHistoryService.cs index 78091e9ec..d3e33f9b0 100644 --- a/src/NzbDrone.Core/History/EntityHistoryService.cs +++ b/src/NzbDrone.Core/History/EntityHistoryService.cs @@ -240,6 +240,7 @@ namespace NzbDrone.Core.History history.Data.Add("ImportedPath", message.ImportedTrack.Path); history.Data.Add("DownloadClient", message.DownloadClientInfo?.Name); history.Data.Add("ReleaseGroup", message.TrackInfo.ReleaseGroup); + history.Data.Add("Size", message.TrackInfo.Size.ToString()); _historyRepository.Insert(history); } @@ -262,6 +263,7 @@ 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()); _historyRepository.Insert(history); } @@ -321,6 +323,7 @@ namespace NzbDrone.Core.History history.Data.Add("Reason", message.Reason.ToString()); history.Data.Add("ReleaseGroup", message.TrackFile.ReleaseGroup); + history.Data.Add("Size", message.TrackFile.Size.ToString()); _historyRepository.Insert(history); } @@ -347,6 +350,7 @@ namespace NzbDrone.Core.History history.Data.Add("SourcePath", sourcePath); history.Data.Add("Path", path); history.Data.Add("ReleaseGroup", message.TrackFile.ReleaseGroup); + history.Data.Add("Size", message.TrackFile.Size.ToString()); _historyRepository.Insert(history); } @@ -404,8 +408,9 @@ namespace NzbDrone.Core.History }; history.Data.Add("DownloadClient", message.DownloadClientInfo?.Name); - history.Data.Add("ReleaseGroup", message.TrackedDownload?.RemoteAlbum?.ParsedAlbumInfo?.ReleaseGroup); history.Data.Add("Message", message.Message); + history.Data.Add("ReleaseGroup", message.TrackedDownload?.RemoteAlbum?.ParsedAlbumInfo?.ReleaseGroup); + history.Data.Add("Size", message.TrackedDownload?.DownloadItem.TotalSize.ToString()); historyToAdd.Add(history); }