fix(gamebook): always regenerate the PLIP menu WAV
The spoken story menu was cached by filename, so incremental deploys (adding a story) kept announcing the old, shorter list. Force-rebuild menu.wav each run since its content tracks the (cumulative) book list.
This commit was merged in pull request #192.
This commit is contained in:
@@ -173,9 +173,12 @@ def main() -> int:
|
||||
|
||||
fail = pushed = 0
|
||||
|
||||
# Menu WAV (the spoken story picker).
|
||||
# Menu WAV (the spoken story picker). ALWAYS regenerated: its content
|
||||
# depends on the (cumulative) book list, so a cached menu.wav would still
|
||||
# announce an old, shorter set of stories.
|
||||
menu = OUT_DIR / "menu.wav"
|
||||
if synth_wav(menu_narration(books_meta), menu, args.force, args.tts):
|
||||
menu.unlink(missing_ok=True)
|
||||
if synth_wav(menu_narration(books_meta), menu, True, args.tts):
|
||||
if not args.dry_run:
|
||||
ok, _ = push(args.ip, "menu.wav", menu.read_bytes()); pushed += ok; fail += not ok
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user