Update Komga/Kavita immediately after new chapter is Downloaded
This commit is contained in:
parent
58a62f8272
commit
398ac304d2
@ -27,9 +27,14 @@ 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)
|
||||
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}");
|
||||
|
||||
foreach (LibraryManager lm in taskManager.settings.libraryManagers)
|
||||
lm.UpdateLibrary();
|
||||
}
|
||||
return downloadSuccess;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user