mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-31 12:10:19 -07:00
parent
89cbf0c022
commit
c996643921
1 changed files with 0 additions and 16 deletions
|
@ -1,6 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using NLog;
|
using NLog;
|
||||||
using NzbDrone.Core.Configuration;
|
using NzbDrone.Core.Configuration;
|
||||||
using NzbDrone.Core.Download.TrackedDownloads;
|
using NzbDrone.Core.Download.TrackedDownloads;
|
||||||
|
@ -33,14 +31,6 @@ namespace NzbDrone.Core.Download
|
||||||
_logger = logger;
|
_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)
|
public void Execute(ProcessMonitoredDownloadsCommand message)
|
||||||
{
|
{
|
||||||
var enableCompletedDownloadHandling = _configService.EnableCompletedDownloadHandling;
|
var enableCompletedDownloadHandling = _configService.EnableCompletedDownloadHandling;
|
||||||
|
@ -66,12 +56,6 @@ namespace NzbDrone.Core.Download
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (enableCompletedDownloadHandling && _configService.RemoveCompletedDownloads)
|
|
||||||
{
|
|
||||||
// Remove tracked downloads that are now complete
|
|
||||||
RemoveCompletedDownloads(trackedDownloads);
|
|
||||||
}
|
|
||||||
|
|
||||||
_eventAggregator.PublishEvent(new DownloadsProcessedEvent());
|
_eventAggregator.PublishEvent(new DownloadsProcessedEvent());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue