Allow reprocessing after video drop: skip audio/shots steps lacking media, limit reprocess dropdown to docs+; plus pending ext/report/ui changes
This commit is contained in:
+5
-5
@@ -217,8 +217,7 @@ def run_all(start_from):
|
||||
for row in db.connect().execute(
|
||||
"SELECT name FROM recordings WHERE status!='recording' ORDER BY name"
|
||||
):
|
||||
if db.media(row[0])[0]:
|
||||
launch(row[0], start_from) # no source video (drop_video): no re-elaboration
|
||||
launch(row[0], start_from)
|
||||
return True
|
||||
|
||||
|
||||
@@ -929,7 +928,7 @@ class Handler(BaseHTTPRequestHandler):
|
||||
# POST: ingestion (/chunk, /events, /upload), recording control, and actions.
|
||||
def do_POST(self):
|
||||
parsed = urlparse(self.path)
|
||||
params = {key: value[0] for key, value in parse_qs(parsed.query).items()}
|
||||
params = {key: value[0] for key, value in parse_qs(parsed.query, keep_blank_values=True).items()}
|
||||
name = Path(params.get("name", "x")).name
|
||||
if parsed.path == "/upload":
|
||||
return self.upload(params)
|
||||
@@ -1019,9 +1018,10 @@ class Handler(BaseHTTPRequestHandler):
|
||||
b"not found", 404
|
||||
)
|
||||
elif parsed.path == "/run":
|
||||
if not db.media(name)[0]:
|
||||
return self._send(b"video eliminato: rielaborazione non possibile", 409)
|
||||
# Re-run the flow from a step (default audio), with optional speaker count.
|
||||
# `refine` (even empty) replaces the saved report-refinement prompt; absent = keep.
|
||||
if "refine" in params:
|
||||
db.set_meta(name, refine=params["refine"].strip())
|
||||
launched = launch(name, params.get("from", "audio"), int(params.get("speakers") or 0))
|
||||
self._send(
|
||||
b"" if launched else "già in coda o in esecuzione".encode(),
|
||||
|
||||
Reference in New Issue
Block a user