Update Komga/Kavita immediately after new chapter is Downloaded
This commit is contained in:
parent
58a62f8272
commit
398ac304d2
@ -28,8 +28,13 @@ public class DownloadChapterTask : TrangaTask
|
|||||||
connector.CopyCoverFromCacheToDownloadLocation(this.publication, taskManager.settings);
|
connector.CopyCoverFromCacheToDownloadLocation(this.publication, taskManager.settings);
|
||||||
HttpStatusCode downloadSuccess = connector.DownloadChapter(this.publication, this.chapter, this, cancellationToken);
|
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)
|
foreach(NotificationManager nm in taskManager.settings.notificationManagers)
|
||||||
nm.SendNotification("Chapter downloaded", $"{this.publication.sortName} {this.chapter.chapterNumber} {this.chapter.name}");
|
nm.SendNotification("Chapter downloaded", $"{this.publication.sortName} {this.chapter.chapterNumber} {this.chapter.name}");
|
||||||
|
|
||||||
|
foreach (LibraryManager lm in taskManager.settings.libraryManagers)
|
||||||
|
lm.UpdateLibrary();
|
||||||
|
}
|
||||||
return downloadSuccess;
|
return downloadSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user