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

Function _write_metadata

app/pipeline/runner.py:172–192  ·  view source on GitHub ↗
(job: Job, job_dir: Path)

Source from the content-addressed store, hash-verified

170
171
172def _write_metadata(job: Job, job_dir: Path) -> None:
173 meta = {
174 "title": job.title,
175 "thumbnail": job.thumbnail,
176 "duration_sec": job.duration_sec,
177 "bpm": job.bpm,
178 "key": job.key,
179 "scale": job.scale,
180 "key_confidence": job.key_confidence,
181 "lufs": job.lufs,
182 "peak_db": job.peak_db,
183 "dynamic_range": job.dynamic_range,
184 "tempo_stability": job.tempo_stability,
185 "stem_presence": job.stem_presence,
186 "tags": job.tags,
187 "has_video": job.has_video,
188 }
189 try:
190 (job_dir / "metadata.json").write_text(json.dumps(meta, indent=2) + "\n", encoding="utf-8")
191 except OSError:
192 logger.warning("could not write metadata.json for job %s", job.id, exc_info=True)
193
194
195async def _run_async(

Callers 1

_run_asyncFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected