MCPcopy
hub / github.com/stemdeckapp/stemdeck / vhook

Function vhook

app/pipeline/download.py:171–178  ·  view source on GitHub ↗
(d: dict)

Source from the content-addressed store, hash-verified

169 1080p is large, and the MP4 export doesn't need it."""
170
171 def vhook(d: dict) -> None:
172 if job.cancel_requested:
173 raise JobCancelled()
174 if d.get("status") == "downloading":
175 total = d.get("total_bytes") or d.get("total_bytes_estimate")
176 if total:
177 p = float(d.get("downloaded_bytes", 0)) / float(total)
178 _set(job, stage=f"Fetching video {int(p * 100)}%")
179
180 # Prefer H.264 (avc1) so the exported MP4 plays everywhere -- YouTube also
181 # serves AV1/VP9 in mp4 containers, which many players (Safari/iOS, older

Callers

nothing calls this directly

Calls 2

JobCancelledClass · 0.90
_setFunction · 0.90

Tested by

no test coverage detected