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

@@ -41,9 +41,8 @@ class HttpConfig {
bool useServerCtime;
HttpConfig({
this.userAgent =
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36',
this.connections = 16,
this.userAgent = '',
this.connections = 0,
this.useServerCtime = false,
});
@@ -55,10 +54,19 @@ class HttpConfig {
@JsonSerializable()
class BtConfig {
int listenPort = 0;
List<String> trackers = [];
int listenPort;
List<String> trackers;
bool seedKeep;
double seedRatio;
int seedTime;
BtConfig();
BtConfig({
this.listenPort = 0,
this.trackers = const [],
this.seedKeep = false,
this.seedRatio = 0,
this.seedTime = 0,
});
factory BtConfig.fromJson(Map<String, dynamic> json) =>
_$BtConfigFromJson(json);