Fixed: Speed up mass deletes from Movie Editor (#4463)

This commit is contained in:
Qstick
2020-06-04 23:35:02 -04:00
committed by GitHub
parent 913037c45e
commit 7adb358d1c
34 changed files with 389 additions and 133 deletions

View File

@@ -37,7 +37,7 @@ namespace NzbDrone.Core.History
IHandle<DownloadFailedEvent>,
IHandle<MovieFileDeletedEvent>,
IHandle<MovieFileRenamedEvent>,
IHandle<MovieDeletedEvent>,
IHandle<MoviesDeletedEvent>,
IHandle<DownloadIgnoredEvent>
{
private readonly IHistoryRepository _historyRepository;
@@ -247,9 +247,9 @@ namespace NzbDrone.Core.History
_historyRepository.Insert(history);
}
public void Handle(MovieDeletedEvent message)
public void Handle(MoviesDeletedEvent message)
{
_historyRepository.DeleteForMovie(message.Movie.Id);
_historyRepository.DeleteForMovies(message.Movies.Select(m => m.Id).ToList());
}
public string FindDownloadId(MovieImportedEvent trackedDownload)