Compare commits

...

2 Commits

Author SHA1 Message Date
e4f33bcca9 Set ExecutionState to waiting after finished 2023-05-31 21:52:50 +02:00
fbba7c45b9 annotation 2023-05-31 21:44:16 +02:00
3 changed files with 11 additions and 1 deletions

View File

@ -5,7 +5,7 @@ using Tranga.TrangaTasks;
namespace Tranga;
/// <summary>
/// Stores information on Task
/// Stores information on Task, when implementing new Tasks also update the serializer
/// </summary>
public abstract class TrangaTask
{
@ -80,6 +80,13 @@ public abstract class TrangaTask
public override bool CanWrite => false;
/// <summary>
/// Don't call this
/// </summary>
/// <param name="writer"></param>
/// <param name="value"></param>
/// <param name="serializer"></param>
/// <exception cref="Exception"></exception>
public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer)
{
throw new Exception("Dont call this");

View File

@ -24,6 +24,8 @@ public class DownloadNewChaptersTask : TrangaTask
foreach(Chapter newChapter in newChapters)
connector.DownloadChapter(pub, newChapter);
this.state = ExecutionState.Waiting;
}
/// <summary>

View File

@ -16,5 +16,6 @@ public class UpdateKomgaLibraryTask : TrangaTask
Komga.KomgaLibrary[] allLibraries = komga.GetLibraries();
foreach (Komga.KomgaLibrary lib in allLibraries)
komga.UpdateLibrary(lib.id);
this.state = ExecutionState.Waiting;
}
}