diff --git a/Tranga/Jobs/ProgressToken.cs b/Tranga/Jobs/ProgressToken.cs index e718c7d..3823ac2 100644 --- a/Tranga/Jobs/ProgressToken.cs +++ b/Tranga/Jobs/ProgressToken.cs @@ -10,7 +10,7 @@ public class ProgressToken public DateTime executionStarted { get; private set; } public TimeSpan timeRemaining => GetTimeRemaining(); - public enum State { Running, Complete, Standby, Cancelled, Waiting } + public enum State : byte { Running = 0, Complete = 1, Standby = 2, Cancelled = 3, Waiting = 4 } public State state { get; private set; } public ProgressToken(int increments) diff --git a/docs/Types.md b/docs/Types.md index 3471709..bfc3cb5 100644 --- a/docs/Types.md +++ b/docs/Types.md @@ -45,7 +45,7 @@ } ``` -## ReleaseStatus +### ReleaseStatus ``` { Continuing = 0, @@ -74,7 +74,7 @@ } ``` -## JobType +### JobType ``` { DownloadChapterJob = 0, @@ -94,7 +94,18 @@ "lastUpdate": Date, "executionStarted": Date, "timeRemaining": Date, - "state": number + "state": number //see ProgressState +} +``` + +### ProgressState +``` +{ + Running = 0, + Complete = 1, + Standby = 2, + Cancelled = 3, + Waiting = 4 } ``` @@ -129,7 +140,7 @@ } ``` -## LibraryType +### LibraryType ``` { Komga = 0, @@ -149,7 +160,7 @@ } ``` -## NotificationConnectorType +### NotificationConnectorType ``` { Gotify = 0,