feat: torrent seed config (#599)

This commit is contained in:
Levi authored and GitHub committed 2024-07-30 12:50:06 +08:00
1 parent 473c58796c
commit 3b50465708
22 files changed
+456 -144

No files matched your search

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