mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-12 03:14:09 +00:00
feat: show extraction progress (#1217)
This commit is contained in:
1 parent
dbe37befa3
commit
b0e133b554
27 files changed
+2591
-40
No files matched your search
@@ -8,6 +8,18 @@ enum Status { ready, running, pause, wait, error, done }
|
||||
|
||||
enum Protocol { http, bt }
|
||||
|
||||
// ExtractStatus enum matching Go backend
|
||||
enum ExtractStatus {
|
||||
@JsonValue('')
|
||||
none,
|
||||
@JsonValue('extracting')
|
||||
extracting,
|
||||
@JsonValue('done')
|
||||
done,
|
||||
@JsonValue('error')
|
||||
error
|
||||
}
|
||||
|
||||
@JsonSerializable(explicitToJson: true)
|
||||
class Task {
|
||||
String id;
|
||||
@@ -43,6 +55,8 @@ class Progress {
|
||||
int downloaded;
|
||||
int uploadSpeed;
|
||||
int uploaded;
|
||||
ExtractStatus extractStatus;
|
||||
int extractProgress;
|
||||
|
||||
Progress({
|
||||
required this.used,
|
||||
@@ -50,6 +64,8 @@ class Progress {
|
||||
required this.downloaded,
|
||||
required this.uploadSpeed,
|
||||
required this.uploaded,
|
||||
this.extractStatus = ExtractStatus.none,
|
||||
this.extractProgress = 0,
|
||||
});
|
||||
|
||||
factory Progress.fromJson(Map<String, dynamic> json) =>
|
||||
|
||||
Reference in new issue
Block a user