wrolpi/modules
Roland 029f30c4c8 videos: center YouTube auto-captions at download time
YouTube auto-generated captions (via yt-dlp) stamp every cue timing line
with `align:start position:0%`, pinning the on-screen text to the
bottom-left of the player. This strips that exact cue setting from the
downloaded .vtt files so browsers render the captions centered.

- add strip_youtube_caption_positioning() to wrolpi/captions.py — a
  targeted text replacement (not a webvtt round-trip) so the `<c>`
  word-timing tags in the cue text are preserved; matches only the exact
  auto-caption signature, so deliberately positioned cues (e.g. with a
  `line` setting) are left untouched; idempotent.
- call it from VideoDownloader after normalize_video_file_names, gated on
  a youtube.com / youtu.be source URL. It runs before the FileGroup is
  created, so the first index reads the corrected file — no re-index
  plumbing needed.

Complements the client-side fix in #543 (which centers captions in the
player for existing/any-source files); this makes new YouTube downloads
correct at the source.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-16 18:51:36 -06:00
..
archive SQLite: make the browse pages index-only. 2026-07-14 07:46:29 -06:00
docs Postgres -> SQLite hard cutover: the database moves into the media directory. 2026-07-12 14:09:37 -06:00
flasher Flasher: chip-mismatch guard, WROLPi firmware table, colorblind chip colors 2026-07-02 17:26:37 -06:00
inventory Postgres -> SQLite hard cutover: the database moves into the media directory. 2026-07-12 14:09:37 -06:00
map Migrating map downloaders. 2026-05-07 15:54:53 -06:00
videos videos: center YouTube auto-captions at download time 2026-07-16 18:51:36 -06:00
zim Postgres -> SQLite hard cutover: the database moves into the media directory. 2026-07-12 14:09:37 -06:00
__init__.py Move One-Time Pad encryption to the browser (#479) 2026-06-13 13:52:34 -06:00