Moved notification back to DownloadChapterTask

temp: Dont wait for childTasks to finish to finish parent task
This commit is contained in:
2023-07-02 23:06:24 +02:00
parent c97ff69148
commit f9a7828d02
2 changed files with 5 additions and 26 deletions

View File

@ -27,6 +27,9 @@ public class DownloadChapterTask : TrangaTask
Connector connector = taskManager.GetConnector(this.connectorName);
connector.CopyCoverFromCacheToDownloadLocation(this.publication, taskManager.settings);
HttpStatusCode downloadSuccess = connector.DownloadChapter(this.publication, this.chapter, this, cancellationToken);
if((int)downloadSuccess >= 200 && (int)downloadSuccess < 300)
foreach(NotificationManager nm in taskManager.settings.notificationManagers)
nm.SendNotification("Chapter downloaded", $"{this.publication.sortName} {this.chapter.chapterNumber} {this.chapter.name}");
return downloadSuccess;
}