feat(videos): add manual Convert button per MOV file on Pi

- New POST /api/local-video/convert route triggers queue_convert(force=True)
- queue_convert() now returns True/False/None and accepts force param
  to bypass the auto-convert toggle (manual always works)
- Convert button shown for non-MP4, non-converting files in video list
- Clicking spins the button and refreshes list after 1s to show badge

Co-authored-by: Copilot <[email protected]>
This commit is contained in:
Mathieu Moran
2026-08-10 01:28:56 -04:00
co-authored by Copilot
parent ba712bd6db
commit c995599512
3 changed files with 46 additions and 8 deletions
+11
View File
@@ -176,6 +176,17 @@ def local_video_delete():
}
return jsonify(summary), status_codes.get(summary["status"], 409)
@app.route('/api/local-video/convert', methods=['POST'])
def local_video_convert():
body = request.get_json(silent=True) or {}
path = body.get("path", "")
if not path:
return jsonify({"status": "invalid_path", "message": "No path provided."}), 400
queued = app_video.queue_convert(path, force=True)
if queued is False:
return jsonify({"status": "busy", "message": "Already converting."}), 409
return jsonify({"status": "started"})
@app.route('/api/upload/status')
def upload_status():
return jsonify(app_upload.get_status())