skald/migrations/0009_story_audiobook.sql
Kayos 575749b774 web: audiobook player — stitched-file playback with chapter seek
Adds GET /stories/{id}/listen: one <audio> element over a story's
stitched audiobook file plus a clickable chapter list. Clicking a
chapter seeks; the chapter under the playhead highlights as it
plays. Chapter offsets are summed from each chapter's latest
succeeded narration_run duration — the same order the file was
stitched. One small inline script, the web UI's first JS.

New stories.audiobook_path column (migration 0009) holds the
served path; the story page shows a "listen" action when set.
2026-05-15 07:30:56 -07:00

7 lines
386 B
SQL

-- A story can have a single stitched audiobook — all its chapter
-- renders concatenated into one chaptered file (see the m4b built
-- from per-chapter narration_runs). audiobook_path is the path the
-- web server serves it from (e.g. /audio/The-Coast-Down.m4b); NULL
-- means no audiobook has been stitched yet.
ALTER TABLE stories
ADD COLUMN IF NOT EXISTS audiobook_path text;