Update src/NzbDrone.Core/Download/CompletedDownloadService.cs
This commit is contained in:
parent
74ded61a71
commit
af2f368e33
|
@ -260,14 +260,9 @@ namespace NzbDrone.Core.Download
|
||||||
{
|
{
|
||||||
var grabbedHistories = _historyService.FindByDownloadId(trackedDownload.DownloadItem.DownloadId).Where(h => h.EventType == EpisodeHistoryEventType.Grabbed).ToList();
|
var grabbedHistories = _historyService.FindByDownloadId(trackedDownload.DownloadItem.DownloadId).Where(h => h.EventType == EpisodeHistoryEventType.Grabbed).ToList();
|
||||||
|
|
||||||
if (grabbedHistories.Count == 0)
|
|
||||||
{
|
|
||||||
grabbedHistories = new List<EpisodeHistory> { new EpisodeHistory() };
|
|
||||||
}
|
|
||||||
|
|
||||||
trackedDownload.HasNotifiedManualInteractionRequired = true;
|
trackedDownload.HasNotifiedManualInteractionRequired = true;
|
||||||
|
|
||||||
var releaseInfo = new GrabbedReleaseInfo(grabbedHistories);
|
var releaseInfo = grabbedHistories.Count > 0 ? new GrabbedReleaseInfo(grabbedHistories) : null;
|
||||||
var manualInteractionEvent = new ManualInteractionRequiredEvent(trackedDownload, releaseInfo);
|
var manualInteractionEvent = new ManualInteractionRequiredEvent(trackedDownload, releaseInfo);
|
||||||
|
|
||||||
_eventAggregator.PublishEvent(manualInteractionEvent);
|
_eventAggregator.PublishEvent(manualInteractionEvent);
|
||||||
|
|
Loading…
Reference in New Issue