From 4052e14f417925ffc7223061bece034cb7c54877 Mon Sep 17 00:00:00 2001 From: Vxrtrauter Date: Wed, 2 Jul 2025 07:08:07 +0200 Subject: [PATCH] cleaned up code a bit, restructured download functions --- core/download/aria2p_server.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 core/download/aria2p_server.py diff --git a/core/download/aria2p_server.py b/core/download/aria2p_server.py new file mode 100644 index 0000000..a33c19d --- /dev/null +++ b/core/download/aria2p_server.py @@ -0,0 +1,20 @@ +import aria2p +import subprocess +# nig + +def run_aria2p(): + + aria2 = aria2p.API( + aria2p.Client( + host="http://localhost", + port=6800, + secret="" + ) + ) + + + downloads_dir = os.path.join(os.path.expanduser("~"), "Downloads") + subprocess.Popen(["aria2c", "--enable-rpc", "--rpc-listen-all=true", f"--dir={downloads_dir}"]) + + + return aria2p \ No newline at end of file