mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
New: Monitor and Process downloads separately
Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>
This commit is contained in:
@@ -36,7 +36,8 @@ namespace NzbDrone.Core.History
|
||||
IHandle<DownloadFailedEvent>,
|
||||
IHandle<MovieFileDeletedEvent>,
|
||||
IHandle<MovieFileRenamedEvent>,
|
||||
IHandle<MovieDeletedEvent>
|
||||
IHandle<MovieDeletedEvent>,
|
||||
IHandle<DownloadIgnoredEvent>
|
||||
{
|
||||
private readonly IHistoryRepository _historyRepository;
|
||||
private readonly Logger _logger;
|
||||
@@ -223,6 +224,25 @@ namespace NzbDrone.Core.History
|
||||
_historyRepository.Insert(history);
|
||||
}
|
||||
|
||||
public void Handle(DownloadIgnoredEvent message)
|
||||
{
|
||||
var history = new History
|
||||
{
|
||||
EventType = HistoryEventType.DownloadIgnored,
|
||||
Date = DateTime.UtcNow,
|
||||
Quality = message.Quality,
|
||||
SourceTitle = message.SourceTitle,
|
||||
MovieId = message.MovieId,
|
||||
DownloadId = message.DownloadId,
|
||||
Languages = message.Languages
|
||||
};
|
||||
|
||||
history.Data.Add("DownloadClient", message.DownloadClient);
|
||||
history.Data.Add("Message", message.Message);
|
||||
|
||||
_historyRepository.Insert(history);
|
||||
}
|
||||
|
||||
public void Handle(MovieDeletedEvent message)
|
||||
{
|
||||
_historyRepository.DeleteForMovie(message.Movie.Id);
|
||||
|
Reference in New Issue
Block a user