Skip to content

Commit

Permalink
Don't re-trigger completed event
Browse files Browse the repository at this point in the history
  • Loading branch information
markus101 committed Apr 19, 2020
1 parent 770b89c commit c862fd9
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions src/NzbDrone.Core/Download/DownloadProcessingService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,6 @@ public DownloadProcessingService(IConfigService configService,
_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;
Expand All @@ -64,13 +56,6 @@ public void Execute(ProcessMonitoredDownloadsCommand message)
{
_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());
Expand Down

0 comments on commit c862fd9

Please sign in to comment.