️ Rewrite download manager

This commit is contained in:
zhbaor 2023-03-04 13:53:05 +08:00
parent e47a92b77e
commit afc9c112cb
4 changed files with 68 additions and 53 deletions

View file

@ -23,9 +23,5 @@ def get_progress():
@app.post("/download")
def download():
parent_dir = Path(request.json["parent_dir"])
id = request.json["id"]
try:
manager.download(id, parent_dir)
return "OK"
except:
return "Not ready"
manager.download(parent_dir)
return "OK"