mirror of
https://github.com/Lidarr/Lidarr
synced 2025-12-06 08:25:54 +01:00
Fixed: Inherit indexer, size and release group for marked as failed history
(cherry picked from commit e08c9d5501e65aabce3456b2dd7571867508d88f)
This commit is contained in:
parent
4bea38ab9c
commit
a86bd8e862
2 changed files with 7 additions and 1 deletions
|
|
@ -10,6 +10,9 @@ public class EntityHistory : ModelBase
|
|||
{
|
||||
public const string DOWNLOAD_CLIENT = "downloadClient";
|
||||
public const string RELEASE_SOURCE = "releaseSource";
|
||||
public const string RELEASE_GROUP = "releaseGroup";
|
||||
public const string SIZE = "size";
|
||||
public const string INDEXER = "indexer";
|
||||
|
||||
public EntityHistory()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -267,7 +267,9 @@ public void Handle(DownloadFailedEvent message)
|
|||
|
||||
history.Data.Add("DownloadClient", message.DownloadClient);
|
||||
history.Data.Add("Message", message.Message);
|
||||
history.Data.Add("Size", message.TrackedDownload?.DownloadItem.TotalSize.ToString());
|
||||
history.Data.Add("ReleaseGroup", message.TrackedDownload?.RemoteAlbum?.ParsedAlbumInfo?.ReleaseGroup ?? message.Data.GetValueOrDefault(EntityHistory.RELEASE_GROUP));
|
||||
history.Data.Add("Size", message.TrackedDownload?.DownloadItem.TotalSize.ToString() ?? message.Data.GetValueOrDefault(EntityHistory.SIZE));
|
||||
history.Data.Add("Indexer", message.TrackedDownload?.RemoteAlbum?.Release?.Indexer ?? message.Data.GetValueOrDefault(EntityHistory.INDEXER));
|
||||
|
||||
_historyRepository.Insert(history);
|
||||
}
|
||||
|
|
@ -417,6 +419,7 @@ public void Handle(DownloadIgnoredEvent message)
|
|||
history.Data.Add("Message", message.Message);
|
||||
history.Data.Add("ReleaseGroup", message.TrackedDownload?.RemoteAlbum?.ParsedAlbumInfo?.ReleaseGroup);
|
||||
history.Data.Add("Size", message.TrackedDownload?.DownloadItem.TotalSize.ToString());
|
||||
history.Data.Add("Indexer", message.TrackedDownload?.RemoteAlbum?.Release?.Indexer);
|
||||
|
||||
historyToAdd.Add(history);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue