Skip to content

Commit

Permalink
Don't re-trigger completed event
Browse files Browse the repository at this point in the history
Closes #1376
  • Loading branch information
markus101 authored and ta264 committed Aug 25, 2020
1 parent 0393cea commit da575fd
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions src/NzbDrone.Core/Download/DownloadProcessingService.cs
@@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using NLog;
using NzbDrone.Core.Configuration;
using NzbDrone.Core.Download.TrackedDownloads;
Expand Down Expand Up @@ -33,14 +31,6 @@ public class DownloadProcessingService : IExecute<ProcessMonitoredDownloadsComma
_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 @@ -66,12 +56,6 @@ public void Execute(ProcessMonitoredDownloadsCommand message)
}
}

if (enableCompletedDownloadHandling && _configService.RemoveCompletedDownloads)
{
// Remove tracked downloads that are now complete
RemoveCompletedDownloads(trackedDownloads);
}

_eventAggregator.PublishEvent(new DownloadsProcessedEvent());
}
}
Expand Down

0 comments on commit da575fd

Please sign in to comment.