mirror of
https://github.com/Readarr/Readarr
synced 2026-01-15 03:53:22 +01:00
New: Add Release group to history for all events
Fixes #1499 Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>
This commit is contained in:
parent
0689bec779
commit
71bd88e531
3 changed files with 8 additions and 0 deletions
|
|
@ -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 @@ public class DownloadIgnoredEvent : IEvent
|
|||
public DownloadClientItemClientInfo DownloadClientInfo { get; set; }
|
||||
public string DownloadId { get; set; }
|
||||
public string Message { get; set; }
|
||||
public TrackedDownload TrackedDownload { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ public bool IgnoreDownload(TrackedDownload trackedDownload)
|
|||
SourceTitle = trackedDownload.DownloadItem.Title,
|
||||
DownloadClientInfo = trackedDownload.DownloadItem.DownloadClientInfo,
|
||||
DownloadId = trackedDownload.DownloadItem.DownloadId,
|
||||
TrackedDownload = trackedDownload,
|
||||
Message = "Manually ignored"
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -200,6 +200,7 @@ public void Handle(BookImportIncompleteEvent message)
|
|||
};
|
||||
|
||||
history.Data.Add("StatusMessages", message.TrackedDownload.StatusMessages.ToJson());
|
||||
history.Data.Add("ReleaseGroup", message.TrackedDownload?.RemoteBook?.ParsedBookInfo?.ReleaseGroup);
|
||||
_historyRepository.Insert(history);
|
||||
}
|
||||
}
|
||||
|
|
@ -235,6 +236,7 @@ public void Handle(TrackImportedEvent message)
|
|||
history.Data.Add("ImportedPath", message.ImportedBook.Path);
|
||||
history.Data.Add("DownloadClient", message.DownloadClientInfo?.Type);
|
||||
history.Data.Add("DownloadClientName", message.DownloadClientInfo?.Name);
|
||||
history.Data.Add("ReleaseGroup", message.BookInfo.ReleaseGroup);
|
||||
|
||||
_historyRepository.Insert(history);
|
||||
}
|
||||
|
|
@ -286,6 +288,7 @@ public void Handle(BookFileDeletedEvent message)
|
|||
};
|
||||
|
||||
history.Data.Add("Reason", message.Reason.ToString());
|
||||
history.Data.Add("ReleaseGroup", message.BookFile.ReleaseGroup);
|
||||
|
||||
_historyRepository.Insert(history);
|
||||
}
|
||||
|
|
@ -307,6 +310,7 @@ public void Handle(BookFileRenamedEvent message)
|
|||
|
||||
history.Data.Add("SourcePath", sourcePath);
|
||||
history.Data.Add("Path", path);
|
||||
history.Data.Add("ReleaseGroup", message.BookFile.ReleaseGroup);
|
||||
|
||||
_historyRepository.Insert(history);
|
||||
}
|
||||
|
|
@ -358,6 +362,7 @@ public void Handle(DownloadIgnoredEvent message)
|
|||
};
|
||||
|
||||
history.Data.Add("DownloadClient", message.DownloadClientInfo.Name);
|
||||
history.Data.Add("ReleaseGroup", message.TrackedDownload?.RemoteBook?.ParsedBookInfo?.ReleaseGroup);
|
||||
history.Data.Add("Message", message.Message);
|
||||
|
||||
historyToAdd.Add(history);
|
||||
|
|
|
|||
Loading…
Reference in a new issue