Skip to content

Commit

Permalink
Assign numbers to ProgressToken.State
Browse files Browse the repository at this point in the history
Update type docs
  • Loading branch information
C9Glax committed Oct 20, 2024
1 parent 93696fb commit 9d47445
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Tranga/Jobs/ProgressToken.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
21 changes: 16 additions & 5 deletions docs/Types.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
}
```

## ReleaseStatus
### ReleaseStatus
```
{
Continuing = 0,
Expand Down Expand Up @@ -74,7 +74,7 @@
}
```

## JobType
### JobType
```
{
DownloadChapterJob = 0,
Expand All @@ -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
}
```

Expand Down Expand Up @@ -129,7 +140,7 @@
}
```

## LibraryType
### LibraryType
```
{
Komga = 0,
Expand All @@ -149,7 +160,7 @@
}
```

## NotificationConnectorType
### NotificationConnectorType
```
{
Gotify = 0,
Expand Down

0 comments on commit 9d47445

Please sign in to comment.