From f7e601a0acf04cbe17768874af7c8eb74f3ae7f6 Mon Sep 17 00:00:00 2001 From: Vxrtrauter <101264710+Vxrtrauter@users.noreply.github.com> Date: Sat, 14 Dec 2024 22:50:23 +0100 Subject: [PATCH] Update download.py --- download.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/download.py b/download.py index 00c6c1c..42f0e5b 100644 --- a/download.py +++ b/download.py @@ -1,6 +1,7 @@ import aria2p import subprocess import keyboard +import os aria2 = aria2p.API( aria2p.Client( @@ -19,7 +20,9 @@ def startDownload(): download = aria2.add_magnet(magnet_uri) -subprocess.Popen(["aria2c", "--enable-rpc", "--rpc-listen-all=true", "--dir=C:\\Users\\shayaa\\Downloads"]) +downloads_dir = os.path.join(os.path.expanduser("~"), "Downloads") + +subprocess.Popen(["aria2c", "--enable-rpc", "--rpc-listen-all=true", f"--dir={downloads_dir}"]) downloads = aria2.get_downloads()