New: Add Release group to history for all events

Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>
pull/3017/head
Qstick 2 years ago
parent 64c2fb2dee
commit 6670aa7116

@ -1,5 +1,6 @@
using System.Collections.Generic;
using NzbDrone.Common.Messaging;
using NzbDrone.Core.Download.TrackedDownloads;
using NzbDrone.Core.Qualities;
namespace NzbDrone.Core.Download
@ -13,5 +14,6 @@ namespace NzbDrone.Core.Download
public DownloadClientItemClientInfo DownloadClientInfo { get; set; }
public string DownloadId { get; set; }
public string Message { get; set; }
public TrackedDownload TrackedDownload { get; set; }
}
}

@ -42,6 +42,7 @@ namespace NzbDrone.Core.Download
SourceTitle = trackedDownload.DownloadItem.Title,
DownloadClientInfo = trackedDownload.DownloadItem.DownloadClientInfo,
DownloadId = trackedDownload.DownloadItem.DownloadId,
TrackedDownload = trackedDownload,
Message = "Manually ignored"
};

@ -197,6 +197,7 @@ namespace NzbDrone.Core.History
};
history.Data.Add("StatusMessages", message.TrackedDownload.StatusMessages.ToJson());
history.Data.Add("ReleaseGroup", message.TrackedDownload?.RemoteAlbum?.ParsedAlbumInfo?.ReleaseGroup);
_historyRepository.Insert(history);
}
}
@ -234,6 +235,7 @@ namespace NzbDrone.Core.History
history.Data.Add("DroppedPath", message.TrackInfo.Path);
history.Data.Add("ImportedPath", message.ImportedTrack.Path);
history.Data.Add("DownloadClient", message.DownloadClientInfo.Name);
history.Data.Add("ReleaseGroup", message.TrackInfo.ReleaseGroup);
_historyRepository.Insert(history);
}
@ -276,6 +278,8 @@ namespace NzbDrone.Core.History
DownloadId = message.TrackedDownload.DownloadItem.DownloadId
};
history.Data.Add("ReleaseGroup", message.TrackedDownload?.RemoteAlbum?.ParsedAlbumInfo?.ReleaseGroup);
_historyRepository.Insert(history);
}
}
@ -307,6 +311,7 @@ namespace NzbDrone.Core.History
};
history.Data.Add("Reason", message.Reason.ToString());
history.Data.Add("ReleaseGroup", message.TrackFile.ReleaseGroup);
_historyRepository.Insert(history);
}
@ -332,6 +337,7 @@ namespace NzbDrone.Core.History
history.Data.Add("SourcePath", sourcePath);
history.Data.Add("Path", path);
history.Data.Add("ReleaseGroup", message.TrackFile.ReleaseGroup);
_historyRepository.Insert(history);
}
@ -355,6 +361,7 @@ namespace NzbDrone.Core.History
};
history.Data.Add("TagsScrubbed", message.Scrubbed.ToString());
history.Data.Add("ReleaseGroup", message.TrackFile.ReleaseGroup);
history.Data.Add("Diff", message.Diff.Select(x => new
{
Field = x.Key,
@ -388,6 +395,7 @@ namespace NzbDrone.Core.History
};
history.Data.Add("DownloadClient", message.DownloadClientInfo.Name);
history.Data.Add("ReleaseGroup", message.TrackedDownload?.RemoteAlbum?.ParsedAlbumInfo?.ReleaseGroup);
history.Data.Add("Message", message.Message);
historyToAdd.Add(history);

Loading…
Cancel
Save