glax
1b9ebd096b
TrangaTask is now abstract TrangaTask implements Execute Method, that is now called instead of TaskExecutor Created inheriting classes of TrangaTask: UpdateKomgaLibraryTask, DownloadNewChaptersTask
19 lines
541 B
C#
19 lines
541 B
C#
namespace Tranga.TrangaTasks;
|
|
|
|
public class UpdateKomgaLibraryTask : TrangaTask
|
|
{
|
|
public UpdateKomgaLibraryTask(Task task, TimeSpan reoccurrence) : base(task, null, null, reoccurrence)
|
|
{
|
|
}
|
|
|
|
public override void Execute(TaskManager taskManager)
|
|
{
|
|
if (taskManager.komga is null)
|
|
return;
|
|
Komga komga = taskManager.komga;
|
|
|
|
Komga.KomgaLibrary[] allLibraries = komga.GetLibraries();
|
|
foreach (Komga.KomgaLibrary lib in allLibraries)
|
|
komga.UpdateLibrary(lib.id);
|
|
}
|
|
} |