4466ea894c800007ab58c7726db3858d5eb0a033
The three recurrence arrays on the two playout write paths are consumed CONJUNCTIVELY by AlternateScheduleSelector.GetScheduleForDate -- a miss on any one `continue`s -- so the empty set is the maximally RESTRICTIVE value, not a neutral one. `?? []` on an omitted array therefore read as "default to no filter" and meant "default to matching nothing": the API returned HTTP 200 and stored an alternate-schedule or template item that could never apply on any date, with nothing logged. The read side had already been decided the other way in #823 (a NULL column reads as the All*() sets), so the two halves of "this field is absent" pointed in opposite directions -- residual (3) of media.nullable-primitive-collection-mutation. Absent and explicitly-empty are two different requests and get two answers: - ABSENT (missing, or an explicit `null` -- Newtonsoft maps both to null and they are indistinguishable) normalizes to AlternateScheduleSelector.All*(), the SAME symbols the selector's null guard and both Mapper.ProjectToViewModel overloads already substitute. Requires List<T>? on the request records, hence the per-file `#nullable enable` the sibling request records already use. - EXPLICIT [] is rejected with a 422 naming the consequence, per api.ffmpeg-profile-numeric-bounds -- not rewritten into the permissive value, which would re-collapse the distinction in the other direction and make "no days" inexpressible. Checked before committing to the normalization, because it is a write-path semantics change: the SPA's generated type is `null | Array<T>` (nullable, not optional) and PlayoutScheduleEditors.tsx always sends the key, and ErsatzTV.Mcp/ToolCatalog.cs explicitly defers these replace-list writes. So no existing client takes the absent path -- the trap was reachable only by a direct API client omitting a field. Rejection is uniform across items, including the highest-Index catch-all whose recurrence the handler discards. Exempting it would restate "which item is the catch-all" in the controller, a second copy of a rule that lives in the handler (api.put-replace-index-order); ValidateDateRanges already makes exactly this choice for the date fields it equally discards. Prod was measured before choosing to reject rather than grandfather an existing empty row: ProgramScheduleAlternate and PlayoutTemplate both hold ZERO rows (jazz /config/ersatztv.sqlite3, 2026-08-30), so no stored [] can be bricked and the ffmpeg-profile compare-against-stored exemption was not needed. Both halves mutation-proved by execution, separately, against the real predecessor clause: reverting the `?? All*()` normalization alone reddens exactly the 3 normalization tests; removing the two ValidateRecurrenceSets call sites alone reddens exactly the 6 rejection cases. Disjoint sets, so the guards are not masking each other. OpenAPI and the generated SPA client are byte-identical before and after -- a non-nullable-annotated List<T> was already emitted as nullable -- so the contract shape did not move, only the behaviour behind it. fixes #880 Decisions-Edit: yes Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019zUmJZHhVP7kXg5DV237TW
fix(754,757): declare graphicsElementIds + padToNearestMinute, and pin every MCP tool to its OpenAPI contract (#760)
fix(754,757): declare graphicsElementIds + padToNearestMinute, and pin every MCP tool to its OpenAPI contract (#760)
ErsatzTV
ErsatzTV lets you transform your media library into a personalized, live TV experience - complete with EPG, channel scheduling, and seamless streaming to all your devices. Rediscover your content, your way.
How It Works
- Install ErsatzTV: Download and set up the server on your system.
- Add Your Media: Connect your media libraries and collections.
- Create Channels: Design and schedule your own live channels.
- Stream Anywhere: Watch on any device with IPTV and EPG support.
Key Features
- Custom channels: Create and schedule your own live TV channels.
- IPTV & EPG: Stream with IPTV and Electronic Program Guide support.
- Hardware Transcoding: High-performance streaming with hardware acceleration (NVENC, QSV, VAAPI, AMF, VideoToolbox)
- Media Server Integration: Connect Plex, Jellyfin, Emby and more.
- Music & Subtitles: Mix music videos and enjoy subtitle support.
- Open Source: Free, open, and community-driven project.
Documentation
Documentation is available at ersatztv.org.
License
This project is inspired by pseudotv-plex and the dizquetv fork and is released under the zlib license.
