Update src/NzbDrone.Core/Download/CompletedDownloadService.cs

This commit is contained in:
Mark McDowall 2024-01-31 19:20:08 -08:00 committed by GitHub
parent 74ded61a71
commit af2f368e33
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 6 deletions

View File

@ -260,14 +260,9 @@ namespace NzbDrone.Core.Download
{
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;
var releaseInfo = new GrabbedReleaseInfo(grabbedHistories);
var releaseInfo = grabbedHistories.Count > 0 ? new GrabbedReleaseInfo(grabbedHistories) : null;
var manualInteractionEvent = new ManualInteractionRequiredEvent(trackedDownload, releaseInfo);
_eventAggregator.PublishEvent(manualInteractionEvent);