Fixes the #74 On Now/Next overlay, which never rendered at transcode time (the seeded on-now-next.yml failed to load, so the element was silently ignored). Found by live visual E2E on ersatztv-test.
Two bugs in the seeded YAML
format_datetime wrong arity — the NEXT line called format_datetime (convert_timezone Epg[1].Start) "h:mm tt" (2 args). TemplateFunctions.FormatDateTime(DateTimeOffset, timeZoneId, format) takes 3 args and does the tz conversion itself → Scriban render threw. Dropped the NEXT start-time (avoids hardcoding a timezone in a shipped default).
Missing font_family — CustomFontMapper.TypefaceFromStyle does TryGetValue(style.FontFamily, …) with a null key → crash before its default-font fallback. Added font_family: "Noto Sans".
Also switched the array-length guard to the verified (array.size Epg) form.
Verification
Live on ersatztv-test: captured a frame of channel 901 with the overlay enabled — the bottom-left NOW/NEXT bug renders correctly (per-line styling, halo). Both the opacity_percent and opacity_expression render paths confirmed; LinearFadeDuration returns 0..1 and peaks at 1.0, so the shipped transient fade renders during its 4–12s window.
New seeder test deserializes the YAML and asserts base_style resolves + every style sets a font_family (would have caught the null-font crash). GraphicsElementSeederTests 4/4.
Format + BOM gates clean.
Latent follow-up (separate): CustomFontMapper.TypefaceFromStyle should treat a null font_family as "use default" rather than crash.
Fixes the #74 On Now/Next overlay, which never rendered at transcode time (the seeded `on-now-next.yml` failed to load, so the element was silently ignored). Found by live visual E2E on ersatztv-test.
## Two bugs in the seeded YAML
1. **`format_datetime` wrong arity** — the NEXT line called `format_datetime (convert_timezone Epg[1].Start) "h:mm tt"` (2 args). `TemplateFunctions.FormatDateTime(DateTimeOffset, timeZoneId, format)` takes **3** args and does the tz conversion itself → Scriban render threw. Dropped the NEXT start-time (avoids hardcoding a timezone in a shipped default).
2. **Missing `font_family`** — `CustomFontMapper.TypefaceFromStyle` does `TryGetValue(style.FontFamily, …)` with a null key → crash **before** its default-font fallback. Added `font_family: "Noto Sans"`.
Also switched the array-length guard to the verified `(array.size Epg)` form.
## Verification
- Live on ersatztv-test: captured a frame of channel 901 with the overlay enabled — the bottom-left NOW/NEXT bug renders correctly (per-line styling, halo). Both the `opacity_percent` and `opacity_expression` render paths confirmed; `LinearFadeDuration` returns 0..1 and peaks at 1.0, so the shipped transient fade renders during its 4–12s window.
- New seeder test deserializes the YAML and asserts `base_style` resolves + every style sets a `font_family` (would have caught the null-font crash). `GraphicsElementSeederTests` 4/4.
- Format + BOM gates clean.
Latent follow-up (separate): `CustomFontMapper.TypefaceFromStyle` should treat a null `font_family` as "use default" rather than crash.
fixes #570
🤖 Generated with [Claude Code](https://claude.com/claude-code)
The #74 seeded on-now-next.yml never rendered at transcode time:
- format_datetime was called with 2 args; it needs 3 (DateTimeOffset, timeZoneId,
format) and does the tz conversion itself, so the Scriban render threw. Drop the
NEXT start-time (avoids hardcoding a timezone in a shipped default).
- styles had no font_family; CustomFontMapper.TypefaceFromStyle crashes on a null
family before its default-font fallback. Add font_family: Noto Sans.
Verified live on ersatztv-test via frame capture. Adds a seeder test that
deserializes the YAML and asserts base_style resolves + every style sets a font.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
No-logic content+test fix. Verified LIVE on ersatztv-test by frame capture (overlay renders NOW/NEXT). Formal cross-model review skipped per the independent-review rubric (no logic/state/migration change; the live render is the verification). Seeder guard test green; format/BOM clean.
Review-verdict: MERGEABLE @ 892f4e35
No-logic content+test fix. Verified LIVE on ersatztv-test by frame capture (overlay renders NOW/NEXT). Formal cross-model review skipped per the independent-review rubric (no logic/state/migration change; the live render is the verification). Seeder guard test green; format/BOM clean.
timothy
merged commit 5a7a4ed7e0 into main2026-07-22 23:39:33 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fixes the #74 On Now/Next overlay, which never rendered at transcode time (the seeded
on-now-next.ymlfailed to load, so the element was silently ignored). Found by live visual E2E on ersatztv-test.Two bugs in the seeded YAML
format_datetimewrong arity — the NEXT line calledformat_datetime (convert_timezone Epg[1].Start) "h:mm tt"(2 args).TemplateFunctions.FormatDateTime(DateTimeOffset, timeZoneId, format)takes 3 args and does the tz conversion itself → Scriban render threw. Dropped the NEXT start-time (avoids hardcoding a timezone in a shipped default).font_family—CustomFontMapper.TypefaceFromStyledoesTryGetValue(style.FontFamily, …)with a null key → crash before its default-font fallback. Addedfont_family: "Noto Sans".Also switched the array-length guard to the verified
(array.size Epg)form.Verification
opacity_percentandopacity_expressionrender paths confirmed;LinearFadeDurationreturns 0..1 and peaks at 1.0, so the shipped transient fade renders during its 4–12s window.base_styleresolves + every style sets afont_family(would have caught the null-font crash).GraphicsElementSeederTests4/4.Latent follow-up (separate):
CustomFontMapper.TypefaceFromStyleshould treat a nullfont_familyas "use default" rather than crash.fixes #570
🤖 Generated with Claude Code
Review-verdict: MERGEABLE @
892f4e35No-logic content+test fix. Verified LIVE on ersatztv-test by frame capture (overlay renders NOW/NEXT). Formal cross-model review skipped per the independent-review rubric (no logic/state/migration change; the live render is the verification). Seeder guard test green; format/BOM clean.