mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-09 18:10:29 +00:00
feat(protocol): add FTP, FTPS and FTPES downloads (#1569)
This commit is contained in:
1 parent
e0951de270
commit
c0b70d319d
54 files changed
+3850
-38
No files matched your search
@@ -52,7 +52,8 @@ sealed class TaskStats {
|
||||
final runtime = _map(json['runtime']);
|
||||
if (snapshot.isEmpty && runtime.isEmpty) return null;
|
||||
return switch (protocol) {
|
||||
Protocol.http => HttpTaskStats.fromJson(snapshot),
|
||||
// FTP stats have the same shape as HTTP stats: one entry per connection.
|
||||
Protocol.http || Protocol.ftp => HttpTaskStats.fromJson(snapshot),
|
||||
Protocol.bt => BtTaskStats.fromJson(snapshot: snapshot, runtime: runtime),
|
||||
Protocol.ed2k => Ed2kTaskStats.fromJson(snapshot: snapshot, runtime: runtime),
|
||||
Protocol.hls || null => null,
|
||||
|
||||
Reference in new issue
Block a user