Skip to content

Commit

Permalink
New: Add size to more history events
Browse files Browse the repository at this point in the history
Closes #6234
  • Loading branch information
markus101 committed Jan 23, 2024
1 parent f95dd00 commit 0d06418
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/NzbDrone.Core/History/HistoryService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ public void Handle(EpisodeImportedEvent message)
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);
}
Expand All @@ -244,6 +245,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?.RemoteEpisode?.ParsedEpisodeInfo?.ReleaseGroup);
history.Data.Add("Size", message.TrackedDownload?.DownloadItem.TotalSize.ToString());

_historyRepository.Insert(history);
}
Expand Down Expand Up @@ -277,6 +279,7 @@ public void Handle(EpisodeFileDeletedEvent message)

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);
}
Expand Down Expand Up @@ -307,6 +310,7 @@ public void Handle(EpisodeFileRenamedEvent message)
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);
}
Expand Down Expand Up @@ -334,6 +338,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?.RemoteEpisode?.ParsedEpisodeInfo?.ReleaseGroup);
history.Data.Add("Size", message.TrackedDownload?.DownloadItem.TotalSize.ToString());

historyToAdd.Add(history);
}
Expand Down

0 comments on commit 0d06418

Please sign in to comment.