|
|
|
@ -32,18 +32,6 @@ namespace NzbDrone.Core.Download
|
|
|
|
|
_logger = logger;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void RemoveCompletedDownloads()
|
|
|
|
|
{
|
|
|
|
|
var trackedDownloads = _trackedDownloadService.GetTrackedDownloads()
|
|
|
|
|
.Where(t => !t.DownloadItem.Removed && t.DownloadItem.CanBeRemoved && t.State == TrackedDownloadState.Imported)
|
|
|
|
|
.ToList();
|
|
|
|
|
|
|
|
|
|
foreach (var trackedDownload in trackedDownloads)
|
|
|
|
|
{
|
|
|
|
|
_eventAggregator.PublishEvent(new DownloadCanBeRemovedEvent(trackedDownload));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Execute(ProcessMonitoredDownloadsCommand message)
|
|
|
|
|
{
|
|
|
|
|
var enableCompletedDownloadHandling = _configService.EnableCompletedDownloadHandling;
|
|
|
|
@ -71,12 +59,6 @@ namespace NzbDrone.Core.Download
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Imported downloads are no longer trackable so process them after processing trackable downloads
|
|
|
|
|
if (removeCompletedDownloads)
|
|
|
|
|
{
|
|
|
|
|
RemoveCompletedDownloads();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_eventAggregator.PublishEvent(new DownloadsProcessedEvent());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|