Merge pull request 'fix(build): include the Music playlist in the static media sync' (#34) from feat/experience-tuning into main
This commit was merged in pull request #34.
This commit is contained in:
@@ -53,3 +53,13 @@ def test_build_emits_frontend_baked_json_and_only_referenced_media(tmp_path):
|
||||
for f in versions["versions"]:
|
||||
assert (media / f).exists(), f"missing synced media: {f}"
|
||||
assert result["media_files"] == sum(1 for _ in media.rglob("*") if _.is_file())
|
||||
|
||||
|
||||
def test_build_includes_the_music_playlist(tmp_path):
|
||||
# The Music-option tracks are referenced by app.js (MUSIC_PLAYLIST), not the
|
||||
# manifest — the build must copy them explicitly or Music 404s on the static site.
|
||||
out = tmp_path / "dist"
|
||||
media = tmp_path / "media"
|
||||
build_static(out, media, media_base="https://static.benstull.art/", app_path="/human-machine-strata")
|
||||
for name in ("manatees", "dewdrop", "eastminster", "overheat", "concentration"):
|
||||
assert (media / "audio" / "music" / f"{name}.mp3").exists(), f"music track not synced: {name}"
|
||||
|
||||
@@ -151,6 +151,10 @@ def build_static(out_dir, media_out, *, media_base: str, app_path: str) -> dict:
|
||||
for s in ring.get("scales", []):
|
||||
if s.get("audio"):
|
||||
referenced.add(f"audio/{s['audio']}")
|
||||
# The Music-option playlist is referenced by the client (app.js MUSIC_PLAYLIST),
|
||||
# not the manifest/ring — add it explicitly or Music 404s on the static site.
|
||||
for name in ("manatees", "dewdrop", "eastminster", "overheat", "concentration"):
|
||||
referenced.add(f"audio/music/{name}.mp3")
|
||||
n = 0
|
||||
for rel in sorted(referenced):
|
||||
src = MEDIA_DIR / rel
|
||||
|
||||
Reference in New Issue
Block a user