mirror of
https://github.com/myronblair/kino-app
synced 2026-07-27 21:18:43 -05:00
auto-commit for b6946a78-11ff-4dc8-85b6-12e35b57d256
This commit is contained in:
+2
-2
@@ -630,8 +630,8 @@ async def cancel_job(job_id: str, user: dict = Depends(require_admin)):
|
||||
raise HTTPException(status_code=400, detail="Cannot cancel a running job")
|
||||
await db.transcode_queue.update_one({"id": job_id}, {"$set": {"status": "cancelled", "finished_at": datetime.now(timezone.utc).isoformat()}})
|
||||
if job["status"] == "pending":
|
||||
# Reset movie hls_status so a new transcode can be triggered
|
||||
await db.movies.update_one({"id": job["movie_id"]}, {"$set": {"hls_status": None}})
|
||||
# Reset movie hls_status AND clear stale hls_path so the row no longer shows as transcoded
|
||||
await db.movies.update_one({"id": job["movie_id"]}, {"$set": {"hls_status": None, "hls_path": None}})
|
||||
return {"ok": True}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user