feat: show extraction progress (#1217)

This commit is contained in:
Matteo Pietro Dazzi authored and GitHub committed 2025-12-31 09:25:21 +08:00
1 parent dbe37befa3
commit b0e133b554
27 files changed
+2591 -40

No files matched your search

+16
View File
@@ -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) =>