dashboard thumb 48x27, step live, spin busy, live thumbnail refresh
- dispatcher: col step ajoutee (migration). set a chaque phase: scp N/M, ffmpeg N/M, trimming hors-eau, reconstruct demo.py - _refresh_thumbnail() scp la DERNIERE frame extraite toutes les ~15s pendant ffmpeg pour que le preview colle a la progression live - template: cache-bust thumbnail via ?t=mtime, step affiche sous progress bar, thumb revenue a 48x27 - CSS: .badge.busy -> animation spin (rotation infinie) au lieu de juste une couleur, .step-text italique mute
This commit is contained in:
10
app/main.py
10
app/main.py
@@ -195,7 +195,15 @@ def _build_acquisitions():
|
||||
d["gp_label"] = gp_label.get((j["acquisition_id"], j["auv"], j["gopro_serial"]), "?")
|
||||
d["video_duration_fmt"] = _fmt_dur(int(j["video_duration_s"] or 0)) if (j["video_duration_s"] or 0) > 0 else "—"
|
||||
d["trimmed_total"] = (j["trimmed_head"] or 0) + (j["trimmed_tail"] or 0)
|
||||
d["has_thumbnail"] = (DB_PATH.parent / "thumbnails" / f"job_{j['id']}.jpg").exists()
|
||||
thumb_path = DB_PATH.parent / "thumbnails" / f"job_{j['id']}.jpg"
|
||||
d["has_thumbnail"] = thumb_path.exists()
|
||||
# Bust the browser cache on the mtime so the preview refreshes as the dispatcher re-copies it.
|
||||
d["thumb_ts"] = int(thumb_path.stat().st_mtime) if d["has_thumbnail"] else 0
|
||||
# Try the new column; fall back silently on old rows.
|
||||
try:
|
||||
d["step"] = j["step"]
|
||||
except (KeyError, IndexError):
|
||||
d["step"] = None
|
||||
# Mask the viser link when the demo.py that was serving it has since died.
|
||||
if j["status"] == "done" and j["viser_url"] and not _viser_alive(j["viser_url"]):
|
||||
d["viser_url"] = None
|
||||
|
||||
Reference in New Issue
Block a user