feat: removing aria2

This commit is contained in:
Chubby Granny Chaser
2025-04-12 18:16:16 +01:00
parent ee1dda90d9
commit afa78e4634
7 changed files with 0 additions and 117 deletions

View File

@@ -1,33 +0,0 @@
import path from "node:path";
import cp from "node:child_process";
import { app } from "electron";
export class Aria2 {
private static process: cp.ChildProcess | null = null;
private static readonly binaryPath = app.isPackaged
? path.join(process.resourcesPath, "aria2", "aria2c")
: path.join(__dirname, "..", "..", "aria2", "aria2c");
public static spawn() {
this.process = cp.spawn(
this.binaryPath,
[
"--enable-rpc",
"--rpc-listen-all",
"--file-allocation=none",
"--allow-overwrite=true",
"-s",
"16",
"-x",
"16",
"-k",
"1M",
],
{ stdio: "inherit", windowsHide: true }
);
}
public static kill() {
this.process?.kill();
}
}