diff --git a/src/NzbDrone.Core/History/EpisodeHistory.cs b/src/NzbDrone.Core/History/EpisodeHistory.cs index 52c329ab9..48a4ee595 100644 --- a/src/NzbDrone.Core/History/EpisodeHistory.cs +++ b/src/NzbDrone.Core/History/EpisodeHistory.cs @@ -12,6 +12,9 @@ public class EpisodeHistory : ModelBase public const string DOWNLOAD_CLIENT = "downloadClient"; public const string SERIES_MATCH_TYPE = "seriesMatchType"; public const string RELEASE_SOURCE = "releaseSource"; + public const string RELEASE_GROUP = "releaseGroup"; + public const string SIZE = "size"; + public const string INDEXER = "indexer"; public EpisodeHistory() { diff --git a/src/NzbDrone.Core/History/HistoryService.cs b/src/NzbDrone.Core/History/HistoryService.cs index 6a8ff6520..94a1ac7fc 100644 --- a/src/NzbDrone.Core/History/HistoryService.cs +++ b/src/NzbDrone.Core/History/HistoryService.cs @@ -249,8 +249,9 @@ public void Handle(DownloadFailedEvent message) history.Data.Add("DownloadClient", message.DownloadClient); 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()); + history.Data.Add("ReleaseGroup", message.TrackedDownload?.RemoteEpisode?.ParsedEpisodeInfo?.ReleaseGroup ?? message.Data.GetValueOrDefault(EpisodeHistory.RELEASE_GROUP)); + history.Data.Add("Size", message.TrackedDownload?.DownloadItem.TotalSize.ToString() ?? message.Data.GetValueOrDefault(EpisodeHistory.SIZE)); + history.Data.Add("Indexer", message.TrackedDownload?.RemoteEpisode?.Release?.Indexer ?? message.Data.GetValueOrDefault(EpisodeHistory.INDEXER)); _historyRepository.Insert(history); } @@ -348,6 +349,7 @@ public void Handle(DownloadIgnoredEvent message) history.Data.Add("Message", message.Message); history.Data.Add("ReleaseGroup", message.TrackedDownload?.RemoteEpisode?.ParsedEpisodeInfo?.ReleaseGroup); history.Data.Add("Size", message.TrackedDownload?.DownloadItem.TotalSize.ToString()); + history.Data.Add("Indexer", message.TrackedDownload?.RemoteEpisode?.Release?.Indexer); history.Data.Add("ReleaseType", message.TrackedDownload?.RemoteEpisode?.ParsedEpisodeInfo?.ReleaseType.ToString()); historyToAdd.Add(history);