Notification moved to TrangaTask

This commit is contained in:
2023-06-27 23:37:13 +02:00
parent a38fcf50ca
commit be8c6b50ba
2 changed files with 16 additions and 3 deletions

View File

@ -27,9 +27,6 @@ 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 && parentTask is not null)
foreach(NotificationManager nm in taskManager.settings.notificationManagers)
nm.SendNotification("New Chapter downloaded", $"{this.publication.sortName} {this.chapter.chapterNumber} {this.chapter.name}");
return downloadSuccess;
}