CueTrack normalizes subtitles; phone shows the transcript #4

Closed
opened 2026-08-09 20:42:20 +00:00 by aiko · 2 comments
Owner

Parent

#1 — PRD: Kurageyomi

What to build

The phone shows the transcript of what is playing.

Add CueTrack: it takes a raw subtitle track and returns normalized Cues — start, end, and
text — with styling and positioning markup removed and ruby furigana handled rather than dumped
inline as tags. Timings are in ticks. Keep Jellyfin types off its boundary so it can be tested
as a pure transform.

An endpoint serves the Cues for the playing item's Japanese text track, and the page renders
them as a scrollable list. Static for now — following the Playhead is #5.

Text tracks only. Image-based tracks (PGS, VOBSUB) are out of scope permanently, not
deferred. When the only available track is an image track, the page says so explicitly and
explains why mining is unavailable. A blank screen or a silent failure is a bug in this slice.

Acceptance criteria

  • CueTrack returns normalized Cues with correct tick timings from a raw text track
  • Styling and positioning tags are stripped from Cue text
  • Ruby furigana is handled rather than left as inline markup
  • An image-only track is rejected with an explicit, user-facing explanation
  • Malformed and empty tracks are handled without throwing
  • Overlapping Cues are handled deterministically
  • The page renders the transcript of the playing item as a scrollable list
  • CueTrack has tests covering the above, using fixtures rather than real media

Blocked by

## Parent #1 — PRD: Kurageyomi ## What to build The phone shows the transcript of what is playing. Add `CueTrack`: it takes a raw subtitle track and returns normalized Cues — start, end, and text — with styling and positioning markup removed and ruby furigana handled rather than dumped inline as tags. Timings are in ticks. Keep Jellyfin types off its boundary so it can be tested as a pure transform. An endpoint serves the Cues for the playing item's Japanese text track, and the page renders them as a scrollable list. Static for now — following the Playhead is #5. **Text tracks only.** Image-based tracks (PGS, VOBSUB) are out of scope permanently, not deferred. When the only available track is an image track, the page says so explicitly and explains why mining is unavailable. A blank screen or a silent failure is a bug in this slice. ## Acceptance criteria - [ ] `CueTrack` returns normalized Cues with correct tick timings from a raw text track - [ ] Styling and positioning tags are stripped from Cue text - [ ] Ruby furigana is handled rather than left as inline markup - [ ] An image-only track is rejected with an explicit, user-facing explanation - [ ] Malformed and empty tracks are handled without throwing - [ ] Overlapping Cues are handled deterministically - [ ] The page renders the transcript of the playing item as a scrollable list - [ ] `CueTrack` has tests covering the above, using fixtures rather than real media ## Blocked by - #2
Author
Owner

This was generated by AI during triage.

Implemented and merged to main at c8440ee. Held open deliberately: the code is unit-tested but has never run on the real server, and this issue's criteria include behaviour only observable there. #6 deploys it; this closes once that confirms it.

> *This was generated by AI during triage.* Implemented and merged to `main` at `c8440ee`. Held open deliberately: the code is unit-tested but has never run on the real server, and this issue's criteria include behaviour only observable there. #6 deploys it; this closes once that confirms it.
Author
Owner

This was generated by AI during triage.

Verified on dionysus: the transcript renders on the phone from a real Japanese subtitle track. Merged in main.

CueTrack is covered by 14 tests. One bug found during review that the tests then pinned: 《》 is ruby only when it holds a reading — around a title it is quotation punctuation, and stripping it was deleting words from lines (《ハンター試験》に合格した became に合格した).

> *This was generated by AI during triage.* Verified on dionysus: the transcript renders on the phone from a real Japanese subtitle track. Merged in `main`. CueTrack is covered by 14 tests. One bug found during review that the tests then pinned: 《》 is ruby only when it holds a reading — around a title it is quotation punctuation, and stripping it was deleting words from lines (`《ハンター試験》に合格した` became `に合格した`).
aiko closed this issue 2026-08-10 08:03:49 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mobrule/kurageyomi#4
No description provided.