mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-09 10:00:27 +00:00
feat(tasks): group extension folder downloads (#1594)
This commit is contained in:
1 parent
fc0a1e0ef9
commit
1e36599d52
84 files changed
+6690
-881
No files matched your search
@@ -28,7 +28,10 @@ enum ExtractStatus {
|
||||
class Task {
|
||||
String id;
|
||||
String name;
|
||||
@JsonKey(unknownEnumValue: JsonKey.nullForUndefinedEnumValue)
|
||||
Protocol? protocol;
|
||||
TaskGroup? group;
|
||||
String parentId;
|
||||
Meta meta;
|
||||
Status status;
|
||||
bool uploading;
|
||||
@@ -47,6 +50,8 @@ class Task {
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
this.doneAt,
|
||||
this.group,
|
||||
this.parentId = '',
|
||||
});
|
||||
|
||||
factory Task.fromJson(Map<String, dynamic> json) => _$TaskFromJson(json);
|
||||
@@ -54,6 +59,18 @@ class Task {
|
||||
Map<String, dynamic> toJson() => _$TaskToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class TaskGroup {
|
||||
final String id;
|
||||
final String name;
|
||||
final String path;
|
||||
final DateTime createdAt;
|
||||
|
||||
TaskGroup({required this.id, required this.name, required this.path, required this.createdAt});
|
||||
factory TaskGroup.fromJson(Map<String, dynamic> json) => _$TaskGroupFromJson(json);
|
||||
Map<String, dynamic> toJson() => _$TaskGroupToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class Progress {
|
||||
int used;
|
||||
|
||||
Reference in new issue
Block a user