mirror of
https://github.com/KeksPirates/SoftwareManager.git
synced 2026-08-04 17:59:43 +02:00
cleaned up code a bit, restructured download functions
This commit is contained in:
@@ -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
|
||||||
Reference in New Issue
Block a user