From db6712f030be45e38e43c54f0d288c876d593137 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 #3250 --- src/NzbDrone.Core/History/HistoryService.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/History/HistoryService.cs b/src/NzbDrone.Core/History/HistoryService.cs index 0225837bd..a96c1d2b3 100644 --- a/src/NzbDrone.Core/History/HistoryService.cs +++ b/src/NzbDrone.Core/History/HistoryService.cs @@ -237,6 +237,7 @@ namespace NzbDrone.Core.History history.Data.Add("DownloadClient", message.DownloadClientInfo?.Type); history.Data.Add("DownloadClientName", message.DownloadClientInfo?.Name); history.Data.Add("ReleaseGroup", message.BookInfo.ReleaseGroup); + history.Data.Add("Size", message.BookInfo.Size.ToString()); _historyRepository.Insert(history); } @@ -259,6 +260,7 @@ namespace NzbDrone.Core.History history.Data.Add("DownloadClient", message.DownloadClient); history.Data.Add("DownloadClientName", message.TrackedDownload?.DownloadItem.DownloadClientInfo.Name); history.Data.Add("Message", message.Message); + history.Data.Add("Size", message.TrackedDownload?.DownloadItem.TotalSize.ToString()); _historyRepository.Insert(history); } @@ -311,6 +313,7 @@ namespace NzbDrone.Core.History history.Data.Add("SourcePath", sourcePath); history.Data.Add("Path", path); history.Data.Add("ReleaseGroup", message.BookFile.ReleaseGroup); + history.Data.Add("Size", message.BookFile.Size.ToString()); _historyRepository.Insert(history); } @@ -362,8 +365,9 @@ namespace NzbDrone.Core.History }; history.Data.Add("DownloadClient", message.DownloadClientInfo.Name); - history.Data.Add("ReleaseGroup", message.TrackedDownload?.RemoteBook?.ParsedBookInfo?.ReleaseGroup); history.Data.Add("Message", message.Message); + history.Data.Add("ReleaseGroup", message.TrackedDownload?.RemoteBook?.ParsedBookInfo?.ReleaseGroup); + history.Data.Add("Size", message.TrackedDownload?.DownloadItem.TotalSize.ToString()); historyToAdd.Add(history); }