Repository navigation
Description
What happened
Jellyfin play sessions stop working 6 hours after PlaybackInfo, while the code intends them to last 24 hours. Every follow-up URL that authenticates by PlaySessionId alone then returns 401. That covers the HLS master and child playlists, segments, and font attachments. A Jellyfin client paused overnight, or playing long content, loses its stream.
internal/jellycompat/router.go sets the compat playback store's lifetime to playback.MaxTokenTTL (24 h). Its comment explains that 6 h expired long and paused-overnight sessions while the stream token was still valid. The router only uses that default when jellyfin_compat.playback_session_ttl is zero or unset, though. Every database is seeded with 6h, so 6 h is what runs. Expiry is absolute from creation.
Reproduced 1 of 1 on a Silo dev deployment.
Steps to reproduce
- Start from a database at the default settings, where
jellyfin_compat.playback_session_ttlis the seeded6h. - Sign in on the Jellyfin port with
POST /Users/AuthenticateByName. POST /Items/<movie-id>/PlaybackInfowith direct play and direct stream turned off and an HLS transcoding profile.- Look up the new row in
jellycompat_playback_sessions.expires_at - created_atis05:59:59.999861. - Request the returned
TranscodingUrlwith every credential stripped, leaving onlyPlaySessionIdandMediaSourceId. It returns 200. - To simulate 6 h 1 m passing, shift the row's
created_atandexpires_at, and theCreatedAt,UpdatedAt, andExpiresAtfields in its JSON, back by 6 h 1 m. Restart the server so the session is reloaded from Postgres. - Request the same URL again. It returns
401 {"Error":"Unauthorized","Message":"Missing authentication token"}.
Expected behavior
A compat play session lasts as long as the router intends, 24 hours, matching the absolute stream-token lifetime (playback.MaxTokenTTL). Step 7 should return 200. An administrator who chose their own jellyfin_compat.playback_session_ttl should keep it.
Silo version / commit
main at d00462089; no build number on the dev build. Latest applied migration: 20261019222507.
Deployment
Local dev build
Area
Jellyfin-compatible clients
Clients affected
Jellyfin-compat client (Infuse, Findroid, ...)
Client app and device
curl against the Jellyfin API. Any Jellyfin client whose HLS follow-up requests carry only PlaySessionId is affected.
Relevant logs
The same master playlist URL, fresh and then after the simulated 6 h 1 m (item and source IDs and client address redacted):
time=2026-10-22T12:49:15.835Z level=INFO msg="jellycompat request" component=jellycompat request_id=94b2157d4dd9/HEdIBGX0bI-000004 method=GET path=/Videos/<item-id>/audio-v2/master.m3u8 original_path=/Videos/<item-id>/audio-v2/master.m3u8 query="MediaSourceId=<source-id>&PlaySessionId=fbd4d85e-3da1-5bd6-88f2-8860c757b58b" route=/Videos/{id}/audio-v2/master.m3u8 status=200 duration_ms=181 remote_addr=<redacted> user_agent=curl/8.5.0 content_length=0 auth_kind=none
time=2026-10-22T12:49:30.652Z level=INFO msg="jellycompat request" component=jellycompat request_id=94b2157d4dd9/6RQS5UcHBD-000001 method=GET path=/Videos/<item-id>/audio-v2/master.m3u8 original_path=/Videos/<item-id>/audio-v2/master.m3u8 query="MediaSourceId=<source-id>&PlaySessionId=fbd4d85e-3da1-5bd6-88f2-8860c757b58b" route=/Videos/{id}/audio-v2/master.m3u8 status=401 duration_ms=0 remote_addr=<redacted> user_agent=curl/8.5.0 content_length=0 auth_kind=none
Technical notes
The 6 h value lives in five places, and the router's 24 h default only wins when the setting is not positive:
migrations/sql/001_schema.sqlseeds('jellyfin_compat.playback_session_ttl', '6h').internal/config/config.go(setDefaults),internal/config/db_loader.go(durationOrfallback), andinternal/config/admin_settings.go(adminSettingDefaults) all default to6h.NewDurableCompatPlaybackStorefalls back to 6 h, whileNewPlaybackSessionStorefalls back toplayback.MaxTokenTTL.
A fix needs a migration that moves stored 6h values to 24h, because existing databases carry the seed. Silo can't tell a seeded 6h from one an administrator typed, so the migration should only touch rows that still equal the seed.
AI harness
Claude Code (via T3 Code)
AI tool(s)
Claude Code, GitHub CLI
AI model(s)
claude-opus-5-5
AI involvement
AI-assisted
Independent or adversarial review
n/a
Confirmations
- I searched open and recently closed issues and pull requests, and this is not already reported
- I reproduced this myself on a real deployment
- Any logs provided are raw apart from marked redactions and are not AI-summarized; if none were available, I said so above
Source: internal code audit of main
Activity
Quick104 commentedon Oct 22, 2026
🤖 AI agent claim. Claude Code (claude-opus-5-5) is working on a fix for this issue on behalf of @Quick104, who is assigned.
A pull request will link here when the fix is ready. If the work stops without a fix, the assignment and this comment are removed.
Planning to work on this, or have context to add? Reply here and mention @Quick104.
fix(jellycompat): keep Jellyfin play sessions for 24 hours by default (…