mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-08 17:40:28 +00:00
feat: torrent seed config (#599)
This commit is contained in:
22 files changed
+456
-144
No files matched your search
@@ -6,11 +6,15 @@ part 'task.g.dart';
|
||||
|
||||
enum Status { ready, running, pause, wait, error, done }
|
||||
|
||||
enum Protocol { http, bt }
|
||||
|
||||
@JsonSerializable(explicitToJson: true)
|
||||
class Task {
|
||||
String id;
|
||||
Protocol? protocol;
|
||||
Meta meta;
|
||||
Status status;
|
||||
bool uploading;
|
||||
Progress progress;
|
||||
DateTime createdAt;
|
||||
DateTime updatedAt;
|
||||
@@ -19,6 +23,7 @@ class Task {
|
||||
required this.id,
|
||||
required this.meta,
|
||||
required this.status,
|
||||
required this.uploading,
|
||||
required this.progress,
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
@@ -34,11 +39,15 @@ class Progress {
|
||||
int used;
|
||||
int speed;
|
||||
int downloaded;
|
||||
int uploadSpeed;
|
||||
int uploaded;
|
||||
|
||||
Progress({
|
||||
required this.used,
|
||||
required this.speed,
|
||||
required this.downloaded,
|
||||
required this.uploadSpeed,
|
||||
required this.uploaded,
|
||||
});
|
||||
|
||||
factory Progress.fromJson(Map<String, dynamic> json) =>
|
||||
|
||||
Reference in new issue
Block a user