下载管理器

This commit is contained in:
2024-02-24 14:42:33 +08:00
parent 65ffd6a92f
commit e0ca3377ac
8 changed files with 363 additions and 31 deletions

View File

@ -251,4 +251,10 @@ foreach ($adapter in $adapterMemory) {
.padLeft(hexDigits, '0')
.toUpperCase();
}
static Future openDir(path) async {
dPrint("SystemHelper.openDir path === $path");
await Process.run(
SystemHelper.powershellPath, ["explorer.exe", "/select,\"$path\""]);
}
}

View File

@ -62,12 +62,13 @@ class Aria2cManager {
"--save-session=${sessionFile.absolute.path.trim()}",
"--save-session-interval=60",
"--file-allocation=trunc",
// TODO for debug
"--max-overall-download-limit=100k"
],
workingDirectory: _aria2cDir,
runInShell: false);
workingDirectory: _aria2cDir);
p.stdout.transform(utf8.decoder).listen((event) {
if (event.trim().isEmpty) return;
dPrint("[aria2c]: $event");
dPrint("[aria2c]: ${event.trim()}");
if (event.contains("IPv4 RPC: listening on TCP port")) {
_isDaemonRunning = true;
aria2c;