From a88b85e599cfd6fbc7e20d385fc0322ea143df03 Mon Sep 17 00:00:00 2001 From: Glax Date: Sun, 20 Oct 2024 01:08:22 +0200 Subject: [PATCH] Add numbers to JobTypes (and type documentation) --- Tranga/Jobs/Job.cs | 2 +- docs/Types.md | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Tranga/Jobs/Job.cs b/Tranga/Jobs/Job.cs index 71dbc24..ac48b39 100644 --- a/Tranga/Jobs/Job.cs +++ b/Tranga/Jobs/Job.cs @@ -12,7 +12,7 @@ public abstract class Job : GlobalBase public string id => GetId(); internal IEnumerable? subJobs { get; private set; } public string? parentJobId { get; init; } - public enum JobType : byte { DownloadChapterJob, DownloadNewChaptersJob, UpdateMetaDataJob, MonitorManga } + public enum JobType : byte { DownloadChapterJob = 0, DownloadNewChaptersJob = 1, UpdateMetaDataJob = 2, MonitorManga = 3 } public MangaConnector mangaConnector => GetMangaConnector(); diff --git a/docs/Types.md b/docs/Types.md index c04bb43..3e2c45b 100644 --- a/docs/Types.md +++ b/docs/Types.md @@ -21,7 +21,7 @@ "links": string[][], "year": int, "originalLanguage": string, - "releaseStatus": ReleaseStatus, + "releaseStatus": ReleaseStatus, see ReleaseStatus "folderName": string, "publicationId": string, "internalId": string, @@ -53,7 +53,7 @@ ## Job ``` { - jobType: number, + jobType: number, see JobType mangaInternalId: string, translatedLanguage: string, progressToken: ProgressToken, @@ -67,6 +67,16 @@ } ``` +## JobType +``` +{ + DownloadChapterJob = 0, + DownloadNewChaptersJob = 1, + UpdateMetaDataJob = 2, + MonitorManga = 3 +} +``` + ## ProgressToken ``` {