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
1 changed files with 0 additions and 15 deletions

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());