From 833340f8bd95a4dba6ec5f5259e8a8d35c7b08db 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 #9672 --- 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 c7807624b..785124ee7 100644 --- a/src/NzbDrone.Core/History/HistoryService.cs +++ b/src/NzbDrone.Core/History/HistoryService.cs @@ -203,6 +203,7 @@ public void Handle(MovieFileImportedEvent message) history.Data.Add("DownloadClientName", message.DownloadClientInfo?.Name); history.Data.Add("ReleaseGroup", message.MovieInfo.ReleaseGroup); history.Data.Add("CustomFormatScore", message.MovieInfo.CustomFormatScore.ToString()); + history.Data.Add("Size", message.MovieInfo.Size.ToString()); history.Data.Add("IndexerFlags", message.ImportedMovie.IndexerFlags.ToString()); _historyRepository.Insert(history); @@ -228,6 +229,7 @@ public void Handle(MovieFileDeletedEvent message) history.Data.Add("Reason", message.Reason.ToString()); history.Data.Add("ReleaseGroup", message.MovieFile.ReleaseGroup); + history.Data.Add("Size", message.MovieFile.Size.ToString()); history.Data.Add("IndexerFlags", message.MovieFile.IndexerFlags.ToString()); _historyRepository.Insert(history); @@ -255,6 +257,7 @@ public void Handle(MovieFileRenamedEvent message) history.Data.Add("Path", path); history.Data.Add("RelativePath", relativePath); history.Data.Add("ReleaseGroup", message.MovieFile.ReleaseGroup); + history.Data.Add("Size", message.MovieFile.Size.ToString()); history.Data.Add("IndexerFlags", message.MovieFile.IndexerFlags.ToString()); _historyRepository.Insert(history); @@ -277,6 +280,7 @@ public void Handle(DownloadIgnoredEvent message) history.Data.Add("DownloadClientName", message.DownloadClientInfo.Name); history.Data.Add("Message", message.Message); history.Data.Add("ReleaseGroup", message.TrackedDownload?.RemoteMovie?.ParsedMovieInfo?.ReleaseGroup); + history.Data.Add("Size", message.TrackedDownload?.DownloadItem.TotalSize.ToString()); _historyRepository.Insert(history); } @@ -303,6 +307,7 @@ public void Handle(DownloadFailedEvent message) history.Data.Add("DownloadClientName", message.TrackedDownload?.DownloadItem.DownloadClientInfo.Name); history.Data.Add("Message", message.Message); history.Data.Add("ReleaseGroup", message.TrackedDownload?.RemoteMovie?.ParsedMovieInfo?.ReleaseGroup); + history.Data.Add("Size", message.TrackedDownload?.DownloadItem.TotalSize.ToString()); _historyRepository.Insert(history); }