1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-10-31 07:52:37 +01:00

Don't re-trigger completed event

This commit is contained in:
Mark McDowall 2020-03-03 20:00:01 -08:00 committed by Mark McDowall
parent 770b89c2b3
commit c862fd9ff6

View File

@ -33,14 +33,6 @@ namespace NzbDrone.Core.Download
_logger = logger;
}
private void RemoveCompletedDownloads(List<TrackedDownload> trackedDownloads)
{
foreach (var trackedDownload in trackedDownloads.Where(c => c.DownloadItem.CanBeRemoved && c.State == TrackedDownloadState.Imported))
{
_eventAggregator.PublishEvent(new DownloadCompletedEvent(trackedDownload));
}
}
public void Execute(ProcessMonitoredDownloadsCommand message)
{
var enableCompletedDownloadHandling = _configService.EnableCompletedDownloadHandling;
@ -64,13 +56,6 @@ namespace NzbDrone.Core.Download
{
_logger.Debug(e, "Failed to process download: {0}", trackedDownload.DownloadItem.Title);
}
}
if (enableCompletedDownloadHandling && _configService.RemoveCompletedDownloads)
{
// Remove tracked downloads that are now complete
RemoveCompletedDownloads(trackedDownloads);
}
_eventAggregator.PublishEvent(new DownloadsProcessedEvent());