From 0d064181941fc6d149fc2f891661e059758d5428 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 Closes #6234 --- src/NzbDrone.Core/History/HistoryService.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/NzbDrone.Core/History/HistoryService.cs b/src/NzbDrone.Core/History/HistoryService.cs index 813329908..b893e0959 100644 --- a/src/NzbDrone.Core/History/HistoryService.cs +++ b/src/NzbDrone.Core/History/HistoryService.cs @@ -219,6 +219,7 @@ namespace NzbDrone.Core.History history.Data.Add("DownloadClientName", message.DownloadClientInfo?.Name); history.Data.Add("ReleaseGroup", message.EpisodeInfo.ReleaseGroup); history.Data.Add("CustomFormatScore", message.EpisodeInfo.CustomFormatScore.ToString()); + history.Data.Add("Size", message.EpisodeInfo.Size.ToString()); _historyRepository.Insert(history); } @@ -244,6 +245,7 @@ namespace NzbDrone.Core.History history.Data.Add("DownloadClientName", message.TrackedDownload?.DownloadItem.DownloadClientInfo.Name); history.Data.Add("Message", message.Message); history.Data.Add("ReleaseGroup", message.TrackedDownload?.RemoteEpisode?.ParsedEpisodeInfo?.ReleaseGroup); + history.Data.Add("Size", message.TrackedDownload?.DownloadItem.TotalSize.ToString()); _historyRepository.Insert(history); } @@ -277,6 +279,7 @@ namespace NzbDrone.Core.History history.Data.Add("Reason", message.Reason.ToString()); history.Data.Add("ReleaseGroup", message.EpisodeFile.ReleaseGroup); + history.Data.Add("Size", message.EpisodeFile.Size.ToString()); _historyRepository.Insert(history); } @@ -307,6 +310,7 @@ namespace NzbDrone.Core.History history.Data.Add("Path", path); history.Data.Add("RelativePath", relativePath); history.Data.Add("ReleaseGroup", message.EpisodeFile.ReleaseGroup); + history.Data.Add("Size", message.EpisodeFile.Size.ToString()); _historyRepository.Insert(history); } @@ -334,6 +338,7 @@ namespace NzbDrone.Core.History history.Data.Add("DownloadClientName", message.DownloadClientInfo.Name); history.Data.Add("Message", message.Message); history.Data.Add("ReleaseGroup", message.TrackedDownload?.RemoteEpisode?.ParsedEpisodeInfo?.ReleaseGroup); + history.Data.Add("Size", message.TrackedDownload?.DownloadItem.TotalSize.ToString()); historyToAdd.Add(history); }