glax
58c01b2174
TrangaTask now only contains essentials, derived classes contain specific information such as connectorName, publication, chapter, etc. Removed taskQueue system, instead all tasks are kept in _allTasks. Progress is being tracked in TrangaTask Added new TrangaTask: DownloadChapter to download single chapters. Fixed duplicate file-access when writing settings.
17 lines
432 B
C#
17 lines
432 B
C#
using Logging;
|
|
|
|
namespace Tranga.TrangaTasks;
|
|
|
|
public class UpdateLibrariesTask : TrangaTask
|
|
{
|
|
public UpdateLibrariesTask(Task task, TimeSpan reoccurrence) : base(task, reoccurrence)
|
|
{
|
|
}
|
|
|
|
protected override void ExecuteTask(TaskManager taskManager, Logger? logger)
|
|
{
|
|
foreach(LibraryManager lm in taskManager.settings.libraryManagers)
|
|
lm.UpdateLibrary();
|
|
this.progress = 1f;
|
|
}
|
|
} |