Compare commits
2 Commits
d9b6062767
...
e4f33bcca9
Author | SHA1 | Date | |
---|---|---|---|
e4f33bcca9 | |||
fbba7c45b9 |
@ -5,7 +5,7 @@ using Tranga.TrangaTasks;
|
|||||||
namespace Tranga;
|
namespace Tranga;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Stores information on Task
|
/// Stores information on Task, when implementing new Tasks also update the serializer
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract class TrangaTask
|
public abstract class TrangaTask
|
||||||
{
|
{
|
||||||
@ -80,6 +80,13 @@ public abstract class TrangaTask
|
|||||||
|
|
||||||
public override bool CanWrite => false;
|
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)
|
public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer)
|
||||||
{
|
{
|
||||||
throw new Exception("Dont call this");
|
throw new Exception("Dont call this");
|
||||||
|
@ -24,6 +24,8 @@ public class DownloadNewChaptersTask : TrangaTask
|
|||||||
|
|
||||||
foreach(Chapter newChapter in newChapters)
|
foreach(Chapter newChapter in newChapters)
|
||||||
connector.DownloadChapter(pub, newChapter);
|
connector.DownloadChapter(pub, newChapter);
|
||||||
|
|
||||||
|
this.state = ExecutionState.Waiting;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -16,5 +16,6 @@ public class UpdateKomgaLibraryTask : TrangaTask
|
|||||||
Komga.KomgaLibrary[] allLibraries = komga.GetLibraries();
|
Komga.KomgaLibrary[] allLibraries = komga.GetLibraries();
|
||||||
foreach (Komga.KomgaLibrary lib in allLibraries)
|
foreach (Komga.KomgaLibrary lib in allLibraries)
|
||||||
komga.UpdateLibrary(lib.id);
|
komga.UpdateLibrary(lib.id);
|
||||||
|
this.state = ExecutionState.Waiting;
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user