diff --git a/app/main.py b/app/main.py index b698938..3d6eca1 100644 --- a/app/main.py +++ b/app/main.py @@ -196,7 +196,7 @@ def _build_acquisitions(): 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) thumb_path = DB_PATH.parent / "thumbnails" / f"job_{j['id']}.jpg" - d["has_thumbnail"] = thumb_path.exists() + d["has_thumbnail"] = thumb_path.is_file() # 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. @@ -207,6 +207,13 @@ def _build_acquisitions(): # 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 + # GLB download link: served by http.server 8300 on the worker + glb_url = None + if d.get("status") == "done" and d.get("frames_dir") and d.get("worker_host"): + frames_basename = (d["frames_dir"] or "").rstrip("/").split("/")[-1] + if frames_basename: + glb_url = f"http://{d['worker_host']}:8300/{frames_basename}/reconstruction.glb" + d["glb_url"] = glb_url by_acq.setdefault(j["acquisition_id"], []).append(d) by_acq_total[j["acquisition_id"]] = by_acq_total.get(j["acquisition_id"], 0) + dur_s diff --git a/app/templates/_jobs_table.html b/app/templates/_jobs_table.html index 0039dd3..965b4e9 100644 --- a/app/templates/_jobs_table.html +++ b/app/templates/_jobs_table.html @@ -15,7 +15,7 @@