mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: get seed status
This commit is contained in:
parent
9c9c0e6c09
commit
c556a00e4a
4 changed files with 26 additions and 0 deletions
|
@ -50,6 +50,20 @@ class Handler(BaseHTTPRequestHandler):
|
|||
|
||||
self.wfile.write(json.dumps(status).encode('utf-8'))
|
||||
|
||||
elif self.path == "/seed-status":
|
||||
if self.headers.get(self.rpc_password_header) != rpc_password:
|
||||
self.send_response(401)
|
||||
self.end_headers()
|
||||
return
|
||||
|
||||
self.send_response(200)
|
||||
self.send_header("Content-type", "application/json")
|
||||
self.end_headers()
|
||||
|
||||
status = torrent_downloader.get_seed_status()
|
||||
|
||||
self.wfile.write(json.dumps(status).encode('utf-8'))
|
||||
|
||||
elif self.path == "/healthcheck":
|
||||
self.send_response(200)
|
||||
self.end_headers()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue