mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-04-24 06:17:08 -04:00
Fixed: Inherit indexer, size and release group for marked as failed history
This commit is contained in:
parent
fef00dccf8
commit
dc590a7455
2 changed files with 7 additions and 2 deletions
|
@ -12,6 +12,9 @@ namespace NzbDrone.Core.History
|
|||
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()
|
||||
{
|
||||
|
|
|
@ -249,8 +249,9 @@ namespace NzbDrone.Core.History
|
|||
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 @@ namespace NzbDrone.Core.History
|
|||
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue