Skip to content

Commit

Permalink
Add numbers to JobTypes (and type documentation)
Browse files Browse the repository at this point in the history
  • Loading branch information
C9Glax committed Oct 19, 2024
1 parent 27f823c commit a88b85e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Tranga/Jobs/Job.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public abstract class Job : GlobalBase
public string id => GetId();
internal IEnumerable<Job>? 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();

Expand Down
14 changes: 12 additions & 2 deletions docs/Types.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"links": string[][],
"year": int,
"originalLanguage": string,
"releaseStatus": ReleaseStatus,
"releaseStatus": ReleaseStatus, see ReleaseStatus
"folderName": string,
"publicationId": string,
"internalId": string,
Expand Down Expand Up @@ -53,7 +53,7 @@
## Job
```
{
jobType: number,
jobType: number, see JobType
mangaInternalId: string,
translatedLanguage: string,
progressToken: ProgressToken,
Expand All @@ -67,6 +67,16 @@
}
```

## JobType
```
{
DownloadChapterJob = 0,
DownloadNewChaptersJob = 1,
UpdateMetaDataJob = 2,
MonitorManga = 3
}
```

## ProgressToken
```
{
Expand Down

0 comments on commit a88b85e

Please sign in to comment.