Fixed: Inherit indexer, size and release group for marked as failed history

This commit is contained in:
Bogdan 2025-03-11 18:00:48 +02:00
parent dcc8b28a07
commit e6c6fceff8
2 changed files with 7 additions and 2 deletions

View file

@ -12,6 +12,9 @@ namespace NzbDrone.Core.History
public const string DOWNLOAD_CLIENT = "downloadClient";
public const string MOVIE_MATCH_TYPE = "movieMatchType";
public const string RELEASE_SOURCE = "releaseSource";
public const string RELEASE_GROUP = "releaseGroup";
public const string SIZE = "size";
public const string INDEXER = "indexer";
public MovieHistory()
{

View file

@ -282,6 +282,7 @@ namespace NzbDrone.Core.History
history.Data.Add("Message", message.Message);
history.Data.Add("ReleaseGroup", message.TrackedDownload?.RemoteMovie?.ParsedMovieInfo?.ReleaseGroup);
history.Data.Add("Size", message.TrackedDownload?.DownloadItem.TotalSize.ToString());
history.Data.Add("Indexer", message.TrackedDownload?.RemoteMovie?.Release?.Indexer);
_historyRepository.Insert(history);
}
@ -307,8 +308,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?.RemoteMovie?.ParsedMovieInfo?.ReleaseGroup);
history.Data.Add("Size", message.TrackedDownload?.DownloadItem.TotalSize.ToString());
history.Data.Add("ReleaseGroup", message.TrackedDownload?.RemoteMovie?.ParsedMovieInfo?.ReleaseGroup ?? message.Data.GetValueOrDefault(MovieHistory.RELEASE_GROUP));
history.Data.Add("Size", message.TrackedDownload?.DownloadItem.TotalSize.ToString() ?? message.Data.GetValueOrDefault(MovieHistory.SIZE));
history.Data.Add("Indexer", message.TrackedDownload?.RemoteMovie?.Release?.Indexer ?? message.Data.GetValueOrDefault(MovieHistory.INDEXER));
_historyRepository.Insert(history);
}