mirror of
https://github.com/KeksPirates/SoftwareManager.git
synced 2026-08-03 17:39:42 +02:00
added other files from main-cli
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import aria2p
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
|
||||
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 aria2
|
||||
@@ -0,0 +1,19 @@
|
||||
from .aria2p_server import run_aria2p
|
||||
import aria2p
|
||||
import subprocess
|
||||
import os
|
||||
# from .scraper import uri
|
||||
def start_client():
|
||||
global aria2
|
||||
aria2 = run_aria2p()
|
||||
|
||||
def add_magnet(uri):
|
||||
aria2.add_magnet(uri)
|
||||
|
||||
|
||||
def terminate():
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user