mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: adding initial torrent as arg command
This commit is contained in:
parent
a0cc15b5d8
commit
41dc504660
4 changed files with 80 additions and 68 deletions
|
@ -4,9 +4,11 @@ from http.server import HTTPServer, BaseHTTPRequestHandler
|
|||
import json
|
||||
import threading
|
||||
import time
|
||||
import urllib.parse
|
||||
|
||||
torrent_port = sys.argv[1]
|
||||
http_port = sys.argv[2]
|
||||
initial_download = json.loads(urllib.parse.unquote(sys.argv[3]))
|
||||
|
||||
class Downloader:
|
||||
def __init__(self):
|
||||
|
@ -62,6 +64,8 @@ class Downloader:
|
|||
|
||||
downloader = Downloader()
|
||||
|
||||
downloader.start_download(initial_download['game_id'], initial_download['magnet'], initial_download['save_path'])
|
||||
|
||||
class Handler(BaseHTTPRequestHandler):
|
||||
def do_GET(self):
|
||||
if self.path == "/status":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue