mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-26 22:46:37 -04:00
Fixed: Manual import for unknown series items will properly mark as imported
Fixes: #277 (cherry picked from commit 3ffcf114682f9b1730f54706ecbf1bf237206bb1)
This commit is contained in:
@@ -130,7 +130,11 @@ namespace NzbDrone.Core.Download
|
||||
if (allItemsImported)
|
||||
{
|
||||
trackedDownload.State = TrackedDownloadState.Imported;
|
||||
_eventAggregator.PublishEvent(new DownloadCompletedEvent(trackedDownload));
|
||||
|
||||
var importedAuthorId = importResults.Where(x => x.Result == ImportResultType.Imported)
|
||||
.Select(c => c.ImportDecision.Item.Author.Id)
|
||||
.MostCommon();
|
||||
_eventAggregator.PublishEvent(new DownloadCompletedEvent(trackedDownload, trackedDownload.RemoteBook?.Author.Id ?? importedAuthorId));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -153,7 +157,11 @@ namespace NzbDrone.Core.Download
|
||||
if (allEpisodesImportedInHistory)
|
||||
{
|
||||
trackedDownload.State = TrackedDownloadState.Imported;
|
||||
_eventAggregator.PublishEvent(new DownloadCompletedEvent(trackedDownload));
|
||||
|
||||
var importedAuthorId = historyItems.Where(x => x.EventType == EntityHistoryEventType.BookFileImported)
|
||||
.Select(x => x.AuthorId)
|
||||
.MostCommon();
|
||||
_eventAggregator.PublishEvent(new DownloadCompletedEvent(trackedDownload, trackedDownload.RemoteBook?.Author.Id ?? importedAuthorId));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user