feat: probe Jellyfin player-owned channel playback #358

Closed
timothy wants to merge 4 commits from feat/357-player-owned-playback into main
Owner

Summary

  • add an authenticated, non-transcoding GET /api/v1/channels/{id}/playback-source seam that resolves the physical scheduled item, filler, offset, mirrors, and next transition;
  • add a standalone, default-off Jellyfin 12.0-rc2 ILiveTvService probe that imports ChicoryTV guide data and returns Jellyfin's native library media sources;
  • record the isolated live evidence, ownership/reuse matrix, rollback, and a no-go for a server-plugin-only continuous-channel replacement.

Live verdict

The narrow seam works: Jellyfin imported 43 channels, selected the scheduled Jellyfin item, and owned direct/transcode negotiation. A forced HLS request launched exactly one Jellyfin FFmpeg process and no ErsatzTV FFmpeg process. Live TV playback kept the virtual channel as the session item, so the backing episode remained absent from Resume/Continue Watching and unplayed; no history-suppression toggle is needed for this path.

The replacement architecture does not work on stock Jellyfin 12.0-rc2:

  • the provider receives no schedule-offset argument and stock Jellyfin web tunes at position zero;
  • Jellyfin can seek when the client explicitly supplies an offset, but the provider cannot connect that to the EPG clock;
  • Jellyfin does not retune an open native source at an EPG boundary, and the pre-boundary source ID becomes unusable after re-resolution;
  • provider source lookup has no user context, so this probe cannot enforce per-user backing-library ACLs.

The current M3U/XMLTV continuous stream remains the supported path. The plugin is an isolated-lab feasibility artifact and is inert unless the unsafe acknowledgement is explicitly enabled.

Scope deliberately stopped

Kodi implementation/tuning, a second boundary, finite-file EOF, long A/V stability, and visual comparison were not run because the required architecture had already failed initial position and its first clean boundary. These gates remain open under #357's original scope; this PR uses Refs #357 and must not close the issue.

Verification

  • full dotnet restore, dotnet build, and dotnet test ErsatzTV.sln passed;
  • final plugin tests: 12/12; scheduled-source handler tests: 9/9;
  • npm run check:api, npm run lint, npm run typecheck, npm test -- --run, and production web build passed;
  • scoped dotnet format --verify-no-changes and git diff --check passed (the whole-solution formatter also reports unrelated pre-existing baseline violations in untouched files);
  • disposable loopback Jellyfin/ErsatzTV clone lab completed and was fully rolled back;
  • exact-head cold review: no findings at 97397906e3771baa68355248b3a6bf8f4d4733d0.

Refs #357

## Summary - add an authenticated, non-transcoding `GET /api/v1/channels/{id}/playback-source` seam that resolves the physical scheduled item, filler, offset, mirrors, and next transition; - add a standalone, default-off Jellyfin 12.0-rc2 `ILiveTvService` probe that imports ChicoryTV guide data and returns Jellyfin's native library media sources; - record the isolated live evidence, ownership/reuse matrix, rollback, and a **no-go** for a server-plugin-only continuous-channel replacement. ## Live verdict The narrow seam works: Jellyfin imported 43 channels, selected the scheduled Jellyfin item, and owned direct/transcode negotiation. A forced HLS request launched exactly one Jellyfin FFmpeg process and no ErsatzTV FFmpeg process. Live TV playback kept the virtual channel as the session item, so the backing episode remained absent from Resume/Continue Watching and unplayed; no history-suppression toggle is needed for this path. The replacement architecture does not work on stock Jellyfin 12.0-rc2: - the provider receives no schedule-offset argument and stock Jellyfin web tunes at position zero; - Jellyfin can seek when the client explicitly supplies an offset, but the provider cannot connect that to the EPG clock; - Jellyfin does not retune an open native source at an EPG boundary, and the pre-boundary source ID becomes unusable after re-resolution; - provider source lookup has no user context, so this probe cannot enforce per-user backing-library ACLs. The current M3U/XMLTV continuous stream remains the supported path. The plugin is an isolated-lab feasibility artifact and is inert unless the unsafe acknowledgement is explicitly enabled. ## Scope deliberately stopped Kodi implementation/tuning, a second boundary, finite-file EOF, long A/V stability, and visual comparison were not run because the required architecture had already failed initial position and its first clean boundary. These gates remain open under #357's original scope; this PR uses `Refs #357` and must not close the issue. ## Verification - full `dotnet restore`, `dotnet build`, and `dotnet test ErsatzTV.sln` passed; - final plugin tests: 12/12; scheduled-source handler tests: 9/9; - `npm run check:api`, `npm run lint`, `npm run typecheck`, `npm test -- --run`, and production web build passed; - scoped `dotnet format --verify-no-changes` and `git diff --check` passed (the whole-solution formatter also reports unrelated pre-existing baseline violations in untouched files); - disposable loopback Jellyfin/ErsatzTV clone lab completed and was fully rolled back; - exact-head cold review: no findings at `97397906e3771baa68355248b3a6bf8f4d4733d0`. Refs #357
timothy added 4 commits 2026-07-15 20:19:21 +02:00
Add a Jellyfin 12 rc2 ILiveTvService probe that reads ErsatzTV guide/source data and returns native Jellyfin media sources while preserving the LiveTvChannel session item.

Refs #357

Co-Authored-By: OpenAI Codex <codex@openai.com>
Add an authenticated playback-source endpoint for player-owned playback and document the Jellyfin Live TV proof-of-concept boundary. Cache guide snapshots for the probe plugin while leaving native Jellyfin source handling in control.

Refs #357

Co-Authored-By: OpenAI Codex <codex@openai.com>
Pin discovery/open to a short schedule-identity snapshot without sharing mutable Jellyfin media sources, gate the authorization-incomplete lab probe behind an explicit opt-in, and add focused plugin tests to the main solution. Redact remote URLs and serialize OpenAPI ApiKey requirements correctly.

Refs #357

Co-Authored-By: OpenAI Codex <codex@openai.com>
docs(jellyfin): record player-owned playback verdict
Build ErsatzTV Image / Docs update reminder (pull_request) Successful in 31s
Build ErsatzTV Image / decisions.md append-only (pull_request) Successful in 31s
Build ErsatzTV Image / Formatting (changed .cs conform to .editorconfig) (pull_request) Successful in 1m37s
Build ErsatzTV Image / API docs in sync (OpenAPI + endpoint index) (pull_request) Successful in 3m7s
Build ErsatzTV Image / Build & test (.NET) (pull_request) Successful in 8m36s
Build ErsatzTV Image / EF migration integrity (SQLite + MySql) (pull_request) Successful in 9m53s
Build ErsatzTV Image / Build & push image (amd64) (pull_request) Has been skipped
97397906e3
Record the isolated Jellyfin 12 live evidence and the server-plugin-only no-go. Remove the discovery snapshot invalidated by Jellyfin's actual playback call path, scope the guide cache to connection settings, and fail closed for dangling mirror sources.

Refs #357

Co-Authored-By: OpenAI Codex <codex@openai.com>
Author
Owner

Review-verdict: MERGEABLE @ 97397906e3

Cold exact-head review of the complete committed diff reported no findings. This verdict covers the isolated feasibility artifact and documented no-go; it does not claim that #357's original Kodi/transition gate is complete.

Review-verdict: MERGEABLE @ 97397906e3771baa68355248b3a6bf8f4d4733d0 Cold exact-head review of the complete committed diff reported no findings. This verdict covers the isolated feasibility artifact and documented no-go; it does not claim that #357's original Kodi/transition gate is complete.
timothy closed this pull request 2026-07-16 20:34:47 +02:00

Pull request closed

Please reopen this pull request to perform a merge.
Sign in to join this conversation.