From 71b0d39b2a0a74969f9e9885dc38b40dc8a4c158 Mon Sep 17 00:00:00 2001 From: Stefano Zini Date: Wed, 4 Nov 2026 09:06:37 +0100 Subject: [PATCH] Add 'skip shots' GUI toggle and crop progress bar --- app/flow.py | 8 ++++++-- app/server.py | 28 ++++++++++++++++++++++------ 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/app/flow.py b/app/flow.py index d22121c..3c69fb4 100644 --- a/app/flow.py +++ b/app/flow.py @@ -94,8 +94,12 @@ def meeting(name: str, start_from: str = "audio", speakers: int = 0, model: str try: done = json.loads(sj.read_text(encoding="utf-8")) except (OSError, ValueError): done = [] # complete = every referenced frame/crop is still on disk (a run cancelled mid-shots wipes them while shots.json is stale) - skip_shots = start_from != "shots" and bool(done) and all((sd / f).exists() for s in done for f in (s.get("file"), s.get("view")) if f) - if skip_shots and go("shots"): print("shots already done: skipped (run from 'shots' to redo)") + no_shots = (db.GLOBAL / "skip_shots.txt").exists() # GUI toggle "Salta schermate" + skip_shots = no_shots or (start_from != "shots" and bool(done) and all((sd / f).exists() for s in done for f in (s.get("file"), s.get("view")) if f)) + if no_shots and not done: + for f in ("shots.json", "glossary.json"): (db.out_dir(name) / f).write_text("[]") + db.replace_shots(name, []) + if skip_shots and go("shots"): print("shots skipped" if no_shots else "shots already done: skipped (run from 'shots' to redo)") if start_from == "render": memory.run(name, link=False) else: diff --git a/app/server.py b/app/server.py index 74a927d..a527aac 100644 --- a/app/server.py +++ b/app/server.py @@ -21,6 +21,7 @@ HERE = Path(__file__).parent out = db.OUT; out.mkdir(exist_ok=True) R = {} # name -> {"last": ts of last chunk} JOBS = {} # name -> Popen +CROP = {} # name -> % of running crop PREFECT = "http://127.0.0.1:4200" ENV = {k: v for k, v in os.environ.items() if k not in ("PYTHONHOME", "UV_INTERNAL__PYTHONHOME")} ENV.update(PREFECT_API_URL=PREFECT + "/api", NO_PROXY="127.0.0.1,localhost") @@ -308,7 +309,7 @@ def status(): if d["running"] and not d["prog"]: d["boot"] = last_log(n) w = db.media(n)[0]; d["mb"] = round(w.stat().st_size / 1e6, 1) if w else 0 rs.append(d) - return {"now": t, "recs": rs, "busy": busy(), "queue": len(QUEUE), + return {"now": t, "recs": rs, "busy": busy(), "queue": len(QUEUE), "skip_shots": (db.GLOBAL / "skip_shots.txt").exists(), "llm": [llama.current(True), llama.current(False)], "llms": [[[k, llama.label(k)] for k in llama.available(v)] for v in (True, False)]} @@ -407,7 +408,7 @@ body.drag main{outline:3px dashed var(--acc);outline-offset:8px;border-radius:14 button.del{color:var(--redf)}button.del:hover{background:var(--red);border-color:var(--redf)} dialog{border:1px solid var(--line);border-radius:14px;background:var(--card);color:var(--fg);padding:16px;width:min(960px,94vw)}dialog::backdrop{background:rgba(0,0,0,.5)} dialog video{width:100%;max-height:68vh;background:#000;border-radius:8px}dialog input.tm{width:90px}#cmsg{color:var(--mut);font-size:13px} -

Riunioni

+

Riunioni

Trascina qui un video o un audio di una riunione per elaborarlo.