diff --git a/ErsatzTV.Infrastructure/Streaming/Graphics/GraphicsElementSeeder.cs b/ErsatzTV.Infrastructure/Streaming/Graphics/GraphicsElementSeeder.cs index be9c63cf8..98067ebb7 100644 --- a/ErsatzTV.Infrastructure/Streaming/Graphics/GraphicsElementSeeder.cs +++ b/ErsatzTV.Infrastructure/Streaming/Graphics/GraphicsElementSeeder.cs @@ -203,7 +203,7 @@ public static class GraphicsElementSeeder /// cleared channel from an untouched one -- a single global flag cannot express both /// properties; see graphics.on-now-next-on-by-default for why that trade is made this /// way. Every channel created after the marker gets the element from - /// CreateChannelHandler instead. + /// ChannelGraphicsDefaults.Attach instead, which BOTH create paths call. /// public static async Task AttachOnNowNextByDefault(TvContext context, CancellationToken cancellationToken) { diff --git a/docs/decisions/README.md b/docs/decisions/README.md index 241daa035..0812f20e3 100644 --- a/docs/decisions/README.md +++ b/docs/decisions/README.md @@ -97,7 +97,7 @@ the link for rationale. Superseded/retired history lives in `archive/`. Regenera | `ffmpeg.work-ahead-slot-release-never-negative` | `Release()` reads the count and compare-exchanges `current - 1` only when `current > 0`; a release against an empty pool records an unbalanced release and returns `false` **without ever writing a negative value**. It never decrements first and clamps afterward. The single caller (`HlsSessionWorker.Transcode`'s `finally`) logs a warning on the `false` return. | 2026-07-21 | [link](records/ffmpeg/work-ahead-slot-release-never-negative.md) | | `graphics.channel-level-attachment` | A channel can attach `GraphicsElement`s directly via a new `ChannelGraphicsElement` join table (a base layer under deco/playout-item elements), and a built-in text element (`on-now-next.yml`) is seeded once per database so the On Now/Next overlay works out of the box. | 2026-07-22 | [link](records/graphics/channel-level-attachment.md) | | `graphics.channel-logo-caching` | An external `http(s)` channel-logo URL is fetched, decode-budget-validated, and stored in the image cache under a content-hash name at SAVE time — becoming byte-identical to an uploaded logo — so the render path never fetches a logo over HTTP; a bad URL fails the save with a 422 (BaseError → ValidationProblemDetails). | 2026-07-21 | [link](records/graphics/channel-logo-caching.md) | -| `graphics.on-now-next-on-by-default` | The built-in On Now / Next element is attached to new channels by `CreateChannelHandler` and to pre-existing channels by a one-time `AttachOnNowNextByDefault` backfill guarded by `graphics.on_now_next_default_attached`. The marker is written only once the built-in element RESOLVES, so an install whose element row does not exist yet is retried rather than stranded; the cost is that while the backfill is still armed it cannot tell a deliberately cleared channel from an untouched one. HLS Direct is excluded at both sites. | 2026-08-26 | [link](records/graphics/on-now-next-on-by-default.md) | +| `graphics.on-now-next-on-by-default` | The built-in On Now / Next element is attached to new channels by `ChannelGraphicsDefaults.Attach`, called from BOTH create paths, and to pre-existing channels by a one-time `AttachOnNowNextByDefault` backfill guarded by `graphics.on_now_next_default_attached`. The marker is written only once the built-in element RESOLVES, so an install whose element row does not exist yet is retried rather than stranded; the cost is that while the backfill is still armed it cannot tell a deliberately cleared channel from an untouched one. HLS Direct is excluded at both sites. | 2026-08-26 | [link](records/graphics/on-now-next-on-by-default.md) | | `graphics.seeded-template-upgrade-by-fingerprint` | `GraphicsElementSeeder` keeps every default it has ever shipped as a verbatim fingerprint; on an already-seeded database it rewrites the on-disk template only when the file still matches one of them (line-endings and trailing whitespace normalised), so an untouched install gets the new default while any operator edit is left alone. | 2026-08-26 | [link](records/graphics/seeded-template-upgrade-by-fingerprint.md) | | `iptv.base-url` | An optional advertised base URL (`iptv.base_url`) is resolved centrally via a pure Core helper (`AdvertisedBaseUrl`) inside the two IPTV generation handlers (M3U + XMLTV); unset/malformed values fall back byte-identical to the request-derived host, and it's a new `iptv` settings group distinct from `ETV_BASE_URL` and out of scope for HDHomeRun. | 2026-07-16 | [link](records/iptv/base-url.md) | | `iptv.logo-drives-bug-preset` | One uploaded channel logo drives both the listing logo and the on-screen bug via a shared, seeded `ChannelLogo`-sourced watermark preset (`Channel Bug`), not new per-channel schema. | 2026-07-20 | [link](records/iptv/logo-drives-bug-preset.md) | diff --git a/docs/decisions/records/graphics/on-now-next-on-by-default.md b/docs/decisions/records/graphics/on-now-next-on-by-default.md index 4715527a4..f925cd269 100644 --- a/docs/decisions/records/graphics/on-now-next-on-by-default.md +++ b/docs/decisions/records/graphics/on-now-next-on-by-default.md @@ -5,8 +5,8 @@ status: active since: '2026-08-26' supersedes: none superseded-by: none -rule: 'The built-in On Now / Next element is attached to new channels by `CreateChannelHandler` and to pre-existing channels by a one-time `AttachOnNowNextByDefault` backfill guarded by `graphics.on_now_next_default_attached`. The marker is written only once the built-in element RESOLVES, so an install whose element row does not exist yet is retried rather than stranded; the cost is that while the backfill is still armed it cannot tell a deliberately cleared channel from an untouched one. HLS Direct is excluded at both sites.' -signals: 'AttachOnNowNextByDefault, GraphicsOnNowNextDefaultAttached, ChannelGraphicsElement default, On Now Next default on, CreateChannelHandler graphics default · paths: `ErsatzTV.Infrastructure/Streaming/Graphics/GraphicsElementSeeder.cs`, `ErsatzTV.Application/Channels/Commands/CreateChannelHandler.cs` · issues: #732, #74' +rule: 'The built-in On Now / Next element is attached to new channels by `ChannelGraphicsDefaults.Attach`, called from BOTH create paths, and to pre-existing channels by a one-time `AttachOnNowNextByDefault` backfill guarded by `graphics.on_now_next_default_attached`. The marker is written only once the built-in element RESOLVES, so an install whose element row does not exist yet is retried rather than stranded; the cost is that while the backfill is still armed it cannot tell a deliberately cleared channel from an untouched one. HLS Direct is excluded at both sites.' +signals: 'AttachOnNowNextByDefault, GraphicsOnNowNextDefaultAttached, ChannelGraphicsDefaults.Attach, ChannelGraphicsElement default, On Now Next default on, create-time graphics default, CreateChannelFromLineup graphics · paths: `ErsatzTV.Infrastructure/Streaming/Graphics/GraphicsElementSeeder.cs`, `ErsatzTV.Application/Channels/ChannelGraphicsDefaults.cs`, `ErsatzTV.Application/Channels/Commands/CreateChannelHandler.cs`, `ErsatzTV.Application/Channels/Commands/CreateChannelFromLineupHandler.cs` · issues: #732, #74' --- #74 shipped the overlay as a per-channel opt-in toggle. #732 made it a default. The binding level is diff --git a/docs/graphics-elements.md b/docs/graphics-elements.md index a2fba1d07..2e1bd9d06 100644 --- a/docs/graphics-elements.md +++ b/docs/graphics-elements.md @@ -100,10 +100,10 @@ Per-style (`StyleDefinition`): `name`, `font_family` (required), `font_size`, `f Every one of these overrides the `base_style`'s value when the style declares it — the halo fields did not until #732, so before that a non-base style silently rendered the base style's halo. The seeded `on-now-next.yml` is unaffected because all three of its styles declare the same halo: its -rendered bitmap is byte-identical either way (md5 `0663AF1E13C558F4DB99F887318E275D`, 1920x1080, -measured 2026-08-26 by rendering +rendered bitmap is byte-identical either way. That invariant holds on any host; a specific hash would +not, because the render depends on the host's fonts (see `docs/testing.md`). Re-derive it by rendering `OnNowNextYaml` through `TextElement` at 1920x1080 with and without the per-style halo merge and -hashing the encoded PNG). +comparing the encoded PNGs — they must be equal, whatever their hash is. **This is an operator-visible change and belongs in the release notes.** A custom template whose non-base style declares its own `halo_color` / `halo_width` / `halo_blur` renders differently after @@ -195,7 +195,7 @@ hides which individual fields inside it are actually reachable from a test. | 9 | already-attached filter removed | `Does_Not_Duplicate_An_Existing_Attachment`
`While_Armed_A_Restored_Element_Is_Attached_To_Every_Eligible_Channel` | | 10 | filename check removed from the built-in lookup | `Ignores_A_Non_Built_In_Element_With_A_Different_Filename` | | 11 | graphics.on_now_next_default_attached guard never fires | `Does_Not_Re_Attach_After_An_Operator_Clears_It` | -| 12 | create-time AttachDefaultGraphicsElements call removed | `Attaches_The_Built_In_Element_To_A_New_Channel` | +| 12 | create-time `ChannelGraphicsDefaults.Attach` call removed from `CreateChannelHandler` | `Attaches_The_Built_In_Element_To_A_New_Channel` | | 13 | HLS-Direct skip removed from the create path | `Leaves_An_Hls_Direct_Channel_Alone_Because_Nothing_Can_Render_There`
`Should_Not_Attach_The_Overlay_To_An_Hls_Direct_Channel` | | 14 | upgrade no longer catches filesystem exceptions | `A_Failed_Replace_After_A_Complete_Temp_Write_Leaves_The_Original_Intact`
`A_Failed_Write_Leaves_The_Original_Template_Intact`
`A_Read_Failure_On_The_Template_Does_Not_Fail_Startup`
`An_Unwritable_Template_Does_Not_Fail_Startup` | | 15 | FitTextBlock drops HaloColor again | `The_Scale_Path_Preserves_Halo_Blur`
`The_Scale_Path_Preserves_The_Halo` |