feat: téléchargement dans sous-dossiers par catégorie

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
dev
2026-05-02 19:16:36 +02:00
parent 978a54a25f
commit f07352bd04
3 changed files with 11 additions and 8 deletions
+2 -1
View File
@@ -55,13 +55,14 @@ class DownloadRequest(BaseModel):
title: str
subtitle: str = ""
year: int | None = None
category: str = ""
@app.post("/api/download")
async def api_download(req: DownloadRequest, bg: BackgroundTasks):
if not req.url:
raise HTTPException(status_code=400, detail="url required")
dl_id = dm.enqueue(req.url, req.title, req.subtitle, req.year, bg)
dl_id = dm.enqueue(req.url, req.title, req.subtitle, req.year, req.category, bg)
return {"id": dl_id}