Music channels dead: Music Videos library has no LibraryPath, so /data/music (30 folders) is never scanned — 8+ collections empty
#474
Closed
opened 2026-07-19 20:34:46 +02:00 by timothy
·
7 comments
No Branch/Tag Specified
main
renovate/dotnet-monorepo
renovate/meziantou.analyzer-3.x
renovate/lucene.net
renovate/sqlitepclraw.bundle_e_sqlite3-3.x
renovate/cliwrap-3.x
913-scripted-playout-401
release/v26.15.0-notes
issue-806-guard-populations
scratch/767b-poisoned
scratch/767b-control
release/v26.14.0-notes
release/v26.14.0
docs/510-skill-logo-bug-policy
fix/510-watermark-resolution-policy
fix/629-verdict-classifier-falseopens
fix/609-decisions-edit-token-scope
issue-135-clear-to-none
release/v26.12.0-notes
fix/409b-lastscan-api-parity
fix/401-updatechannel-mirror-422
fix/327-playlist-rename-validation
fix/410-scancancel-log-level
fix/409-447-librariesscreen-neverscanned
fix/338-zap-exit-code
fix/367-plex-budget-message
fix/310-debom-legacy-cs
ci/604-lane-rebalance
feat/388-design-mirror
feat/247-test-ownership
feat/247-primary-action
feat/357-player-owned-playback
feat/357-jellyfin-plugin-poc
fix/289-mcp-hardening
issue58-mcp
feat/244-channels-extract
ci/auto-bump-prod-compose
feat/multi-rerun-collections-api
feat/collections-api
feat/quick-wins
feat/185-docs-part2
feat/140-collections-screen
feat/146-channel-edit
feat/147-classic-ui-link
issue22-renovate-dashboard
feat/91-cutover
feat/63-composite-create
feat/65-library-browse
feat/85-epg
feat/86-schedule-editor
feat/109-dashboard-data
feat/99-session-tracking
fix/dockerfile-node-tag
feat/59-spa-foundation
docs/59-ui-redesign-brief
feat/102-json-guide
feat/111-schedule-durations
feat/104-artwork-upload
feat/103-media-sources-api
feat/playouts-read-api
feat/108-health-api
feat/105-picker-list-endpoints
issue-97-channel-state-api
issue42-jellyfin-musicvideos
issue46-rest-api-error-contract
dependabot/nuget/ErsatzTV.FFmpeg.Tests/multi-d307a2e06f
qsv-improvements
hdr-vulkan-cuda-test
v26.16.0
v26.15.0
v26.14.0
v26.13.0
v26.12.0
v26.11.0
v26.10.0
v26.9.0
v26.8.0
v26.7.0
blazor-final
v26.6.0
v26.5.0
v26.4.0
v26.3.1
v26.3.0
v26.2.0
v26.1.1
v26.1.0
v25.9.0
v25.8.0
v25.7.1
v25.7.0
v25.6.0
v25.5.0
v25.4.0
v25.3.1
v25.3.0
v25.2.0
v25.1.0
v0.8.8-beta
v0.8.7-beta
v0.8.6-beta
v0.8.5-beta
v0.8.4-beta
v0.8.3-beta
v0.8.2-beta
v0.8.1-beta
v0.8.0-beta
v0.7.9-beta
v0.7.8-beta
v0.7.7-beta
v0.7.6-beta
v0.7.5-beta
v0.7.4-beta
v0.7.3-beta
v0.7.2-beta
v0.7.1-beta
v0.7.0-beta
v0.6.9-beta
v0.6.8-beta
v0.6.7-beta
v0.6.6-beta
v0.6.5-beta
v0.6.4-beta
v0.6.3-beta
v0.6.2-beta
v0.6.1-beta
v0.6.0-beta
v0.5.8-beta
v0.5.7-beta
v0.5.6-beta
v0.5.5-beta
v0.5.4-beta
v0.5.3-beta
v0.5.2-beta
v0.5.1-beta
v0.5.0-beta
v0.4.5-alpha
v0.4.4-alpha
v0.4.3-alpha
v0.4.2-alpha
v0.4.1-alpha
v0.4.0-alpha
v0.3.8-alpha
v0.3.7-alpha
develop
v0.3.6-alpha
v0.3.5-alpha
v0.3.4-alpha
v0.3.3-alpha
v0.3.2-alpha
v0.3.1-alpha
v0.3.0-alpha
v0.2.5-alpha
v0.2.4-alpha
v0.2.3-alpha
v0.2.2-alpha
v0.2.1-alpha
v0.2.0-alpha
v0.1.5-alpha
v0.1.4-alpha
v0.1.3-alpha
v0.1.2-alpha
v0.1.1-alpha
v0.1.0-alpha
v0.0.62-alpha
v0.0.61-alpha
v0.0.60-alpha
v0.0.59-alpha
v0.0.58-alpha
v0.0.57-alpha
v0.0.56-alpha
v0.0.55-alpha
v0.0.54-alpha
v0.0.53-alpha
v0.0.52-alpha
v0.0.51-alpha
v0.0.50-alpha
v0.0.49-prealpha
v0.0.48-prealpha
v0.0.47-prealpha
v0.0.46-prealpha
v0.0.45-prealpha
v0.0.44-prealpha
v0.0.43-prealpha
v0.0.42-prealpha
v0.0.41-prealpha
v0.0.40-prealpha
v0.0.39-prealpha
v0.0.38-prealpha
v0.0.37-prealpha
v0.0.36-prealpha
v0.0.35-prealpha
v0.0.34-prealpha
v0.0.33-prealpha
v0.0.32-prealpha
v0.0.31-prealpha
v0.0.30-prealpha
v0.0.29-prealpha
v0.0.28-prealpha
v0.0.27-prealpha
v0.0.26-prealpha
v0.0.25-prealpha
v0.0.24-prealpha
v0.0.23-prealpha
v0.0.22-prealpha
v0.0.21-prealpha
v0.0.20-prealpha
v0.0.19-prealpha
v0.0.18-prealpha
v0.0.17-prealpha
v0.0.16-prealpha
v0.0.15-prealpha
v0.0.14-prealpha
v0.0.13-prealpha
v0.0.12-prealpha
v0.0.11-prealpha
v0.0.10-prealpha
v0.0.9-prealpha
v0.0.8-prealpha
v0.0.7-prealpha
v0.0.6-prealpha
v0.0.5-prealpha
v0.0.4-prealpha
v0.0.3-prealpha
v0.0.2-prealpha
v0.0.1-prealpha
Labels
Clear labels
ad-hoc
api
bug
ci-cd
content
dependencies
enhancement
frontend
in-progress
jellyfin
parked
priority: high
priority: low
priority: medium
review
security
One-off / ad-hoc work not tracked by a dedicated issue
REST API / HTTP endpoints
Something isn't working
Build, test, deploy pipeline
Channel content / schedules / playlists
Dependency updates (Renovate)
New feature or improvement
ChicoryTV React SPA frontend
Claimed by an active session — do not pick up
Jellyfin tuner / IPTV integration
Excluded from automatic queue pickup; work only when explicitly selected
Adversarial review finding
Security / vulnerability fix
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Blocks
Depends on
Reference: timothy/ersatztv#474
Reference in New Issue
Block a user
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.
Found while measuring #350 on prod (2026-07-19). Companion to #473 — the music channels are broken for a different reason than the sitcom channels.
Symptom
Every playout rebuild floods the log with:
Affected collections (at least): Jungle, Behind the Music, MTV Unplugged, Electronic, Vaporwave, World Music, Hip Hop & Soul, Retro TV Music. Those playouts never build, so the channels are dead.
Root cause
The content is on disk but was never ingested:
/data/musicis mounted and populated — 30 folders (Behind the Music,Electronic,Glastonbury,Habibi Funk,Classic Albums,Concert Films, …), matching the collection names exactly.MusicVideotable: 0 rows.Libraryid 3Music Videos(MediaKind 3) exists, but has noLibraryPathrow. The only configured library paths are:jellyfin://f137a2dd…jellyfin://767bffe4…/data/standupThe affected collections confirm it — all have
0items:So the
Music Videoslibrary has no path pointing at/data/music, nothing is scanned, the collections resolve empty, and playout build fails.Fix
Almost certainly configuration, not code (same shape as the m3u-logo precedent, #1): add a local library path
/data/musicto library 3 (Music Videos) and run a scan, then confirm the collections populate and the playouts build.Worth checking whether the path was lost at some point (e.g. during the bumblebee/VAAPI migration — note the
ersatztv.sqlite3.pre-bumblebee-vaapisnapshot dated 2026-06-17 sitting in the config dir) rather than never configured, so it doesn't silently regress again.Possible code angle (secondary, low confidence)
A collection that resolves to zero items produces an
ERR-level log on every playout rebuild cycle for every affected channel — the noise crowds out genuine errors. Consider whether a persistently-empty collection deserves a single actionable warning (or surfacing in the SPA) rather than a recurring per-rebuild error. Not proposing a change yet; noting it because it made the prod log substantially harder to read while diagnosing #350.Notes
26.10.0./data/musicingestion may belong to the plannedmedia-managementscope).Claiming (Claude Code orchestrator session, 2026-07-20). Operator-selected pickup.
The deterministic selector (
scripts/select-queue.sh) ranked #350 top, but its only remaining step is a release cut + prod deploy of #472'sstartupsub-split — deferred by operator choice. #474 picked instead.Plan: verify the live prod state read-only first (library 3
Music Videos, its missingLibraryPath,/data/musiccontents, and whether the path was lost vs never configured — thepre-bumblebee-vaapisnapshot should answer that), then add the local library path through the app's own API (not raw SQL) and run a scan. Will report before/after collection counts and playout-build status here.Root cause is upstream of ErsatzTV: the Jellyfin library is typed
mixed, so we silently drop itThe issue body's diagnosis (missing local
LibraryPathon library 3) is accurate as far as it goes, but the proposed fix — add/data/musicas a local library path — is not what we want. Direction from the operator this session: music videos should come from Jellyfin. Investigating that turned up the real cause, and it is not a missing feature.Our fork already supports Jellyfin music-video libraries
ErsatzTV.Infrastructure/Jellyfin/JellyfinApiClient.cs→Project(JellyfinLibraryResponse):and
ErsatzTV.Scanner/Application/Jellyfin/Commands/SynchronizeJellyfinLibraryByIdHandler.csdispatchesLibraryMediaKind.MusicVideos→JellyfinMusicVideoLibraryScanner. This is a fork-only capability — Emby (EmbyApiClient.cs) and Plex (PlexServerApiClient.cs) have no music-video kind at all.Why it never appeared
Jellyfin stores a library's content type as a marker file in
/config/data/root/default/<Library>/. On prod:movies.collectiontvshows.collectionmixed.collection/data/music_ => None— silently droppedmixed.collectionmusic.collection// TODO)boxsets.collectionCollectionTypefor a mixed library is not one of the four handled values, soProjectreturnsNoneand the library is dropped without any log line.JellyfinLibraryon prod holds exactly two rows (ids 10, 11) — the music-videos library has never existed in our DB.This also retro-explains an existing oddity: local library 14
Standup→/data/standup(MediaKindMovies) exists precisely because Jellyfin's Standup library is alsomixedand therefore invisible to us. The local-path approach was already used once as a workaround for this exact bug.Was the local music path lost, or never configured?
Never configured. The
ersatztv.sqlite3.pre-bumblebee-vaapisnapshot (2026-06-17) has the identical threeLibraryPathrows (jellyfin://…×2 +/data/standup) andMusicVideo= 0. Nothing regressed — this content was never ingested by any route. That closes the open question in the issue body.Supporting evidence
/data/musicis mounted and populated: 30 artist-level folders, layout<root>/<artist>/<video>.mkv+.nfosidecars — which is exactly what bothMusicVideoFolderScanner(local) and the Jellyfin scanner expect.MusicVideo,Artist,OtherVideo,Songtables: 0 rows.Music Video Mix,Glastonbury Live,Hip Hop & Soul,Retro TV Music,Electronic,Vaporwave,World Music,Jungle,Behind the Music,MTV Unpluggedall have 0CollectionItemrows (Concert Filmshas 1). Their playouts therefore fail to build every cycle, which is theCollection "X" has no valid items!log flood.JellyfinPathReplacementrows exist. Not a problem: movies/shows stream over the Jellyfin HTTP API (/media/jellyfin/{id}), and the music-video scanner'sGetLocalPathfalls back to the raw path — both containers see/data/musicat the same mount point.Chosen fix (operator decision)
Delete and re-add the
Music Videoslibrary in the Jellyfin UI with content typeMusic videos. Jellyfin offers no way to change a library's content type after creation; the marker-file rename was considered and rejected in favour of the supported path. Once Jellyfin re-types it, the ErsatzTV side is ordinary configuration — refresh libraries, enable sync, scan — with no code change in this repo.Verification and the follow-up on populating the empty collections will be reported here.
Secondary observation (unchanged from the body)
A persistently-empty collection logs at
ERRon every playout rebuild for every affected channel. It made the prod log materially harder to read while diagnosing #350. Still worth a separate decision (single actionable warning + SPA surfacing vs. per-rebuild error); not proposing a change under this issue.Scope narrowed: collection population split out to #487
Operator decision — the empty music collections are not to be hand-populated here. They are reserved as the first real write-path acceptance case for the MCP server (#58), filed as #487 (blocked-by #474, dependency set and verified).
So this issue is now exactly: get Jellyfin's music-video content ingested into ErsatzTV. It is done when
Artist/MusicVideorows exist from a successful Jellyfin scan. Reviving the channels is #487's job and will not happen under this issue.Remaining work on #474
Music Videoswith content typeMusic videosPOST /api/v1/media-sources/jellyfin/2/refresh-librariesPUT /api/v1/media-sources/jellyfin/2/libraries— enable sync on the new libraryPOST /api/v1/libraries/{id}/scan→JellyfinMusicVideoLibraryScannerArtist/MusicVideocounts, and that the 30 folders map to sane artistsNo code change in this repo is expected. If the scan does turn up a genuine defect in
JellyfinMusicVideoLibraryScanner— plausible, since it is the fork's only remote music-video scanner, has noItemId/Etagto key on (there is noJellyfinMusicVideoentity), re-processes every item each scan, and has no deletion/trash reconciliation pass — that gets its own issue rather than widening this one.Correction:
/data/musicis genuinely mixed content, and re-typing it tomusicvideoswas the wrong moveTwo claims I made earlier in this thread are wrong. Recording both rather than editing them away.
1. "Both mixed libraries are mislabelled, so mixed support isn't worth building"
False for this library. Operator (2026-07-20):
/data/musicis a deliberate mix — TV shows (Top of the Pops,BBC Old Grey Whistle Test,Soul Train,The Midnight Special), concert movies (Concert Films,Kraftwerk - Minimum Maximum,Underworld — Everything, Everything), and genuine single-performance music videos.mixedwas the honest content type, not a data-entry mistake. Same for/data/standup, which is also a mix of shows and movies.So typing it
musicvideosforces shows and concert films intoArtist/MusicVideoshape, which mis-models most of the library. That change should be considered provisional.2. "Jellyfin's API won't tell us what a given item is, so mixed support means guessing"
Also false, and it was the entire basis of my recommendation against mixed support.
ErsatzTV.Infrastructure/Jellyfin/IJellyfinApi.csalready queries items byparentId+includeItemTypes:parentIdis just the library'sItemId. A mixed library can therefore be queried once per type, and Jellyfin returns authoritative, disjoint sets — no folder-shape inference, no NFO sniffing.JellyfinLibraryItemResponsealso carries a per-itemTypefield ("Movie" | "Series" | "Season" | "Episode" | "MusicVideo"), whichJellyfinApiClient.ProjectToCollectionMediaItemalready switches on for boxsets.The classification problem I was worried about does not exist. The plumbing to ask is already in the codebase.
Direction of travel
Operator decision: support
mixedin code rather than splitting content at the source. The stated goal is segregation — keep music and standup out of the main Movies / TV Shows libraries — with a library understood as a place (one physical path ↔ one Jellyfin library ↔ one ErsatzTV library) whose contents are heterogeneous, rather than as a media kind.That design is being worked now; a
LibraryMediaKindblast-radius audit is in flight and the spec will be linked here. It is not yet approved, so nothing in this comment should be treated as settled.Consequence for this issue
#474 currently sits behind #488 (the scanner crash). If mixed support lands, the prod fix for the music library is probably "re-type it back to mixed and let the new path ingest it correctly" rather than "leave it as musicvideos" — so this issue should not be closed on the strength of the re-type alone.
Status: code side is done and proven; blocked on a release + prod deploy
Releasing my claim (
in-progressremoved). Everything this issue needs from the codebase now exists onmain; what remains is a deploy, which is outside this issue's control.What changed since the last update
ArgumentNullExceptionthat crashed every Jellyfin music-video scan is fixed/data/musicis ever re-typedProven working, on real data
A local instance built from
mainscanned the live/data/musicJellyfin library end to end:So the defect this issue was filed for is fixed. What it cannot yet deliver is content on prod.
Why it is not closable yet
Prod is running image
sha256:5cc2556a…, created 2026-07-18 22:38 (26.10.0). #488 merged on 2026-07-20, so prod does not contain the fix. Enabling sync on the music library there today would reproduce the original crash exactly.Verified by digest rather than by tag — per the #350 lesson that registry tag equality, a fresh
StartedAtand OCI version labels can all lie about what is actually deployed.Also note: ErsatzTV and Jellyfin moved hosts today (now
192.168.1.29). The rollout notes on this issue and #350 that reference192.168.1.99/ bumblebee are stale; that is server-management's to reconcile, not this issue's.Remaining steps (needs a release)
shouldSyncItemson the JellyfinMusic Videoslibrary (currently typedmusicvideos, which the field data supports — see below).Content-modelling note
Typing
/data/musicasmixedwas tried and reverted: it yields 1438 ungrouped Movies and no artists.musicvideosis correct for this library. Neither typing produces folder-based grouping — there is no usable per-item artist metadata (83%Unknown Artist) — so collections must key on folder-derived tags, which was piloted successfully and is written up on #487.Leaving this open with the deploy as the sole remaining blocker.
Claiming (Claude Code orchestrator session, 2026-07-20 batch). Deploy blocker cleared: prod is now running v26.11.0 — verified by manifest digest
sha256:ca5e1fa1…matching the registry:26.11.0/:prodmanifest (not just tag/StartedAt — per the #350 lesson). v26.11.0 contains #488/#494/#489/#497.Executing the remaining steps: enable
shouldSyncItemson Jellyfin library 16 (Music Videos) via the intended REST write path (PUT /api/v1/media-sources/jellyfin/2/libraries, which also enqueues the scan — no container restart needed), then verify ~1437 music videos ingest. Collection population remains #487.Resolved and verified live on prod ✅
The music-video ingestion defect is fixed. Executed the remaining post-deploy steps this session:
What was done
sha256:ca5e1fa1…== registry:26.11.0/:prod), not by tag/StartedAt(per the #350 lesson). Contains #488/#494/#489/#497.PUT /api/v1/media-sources/jellyfin/2/libraries— which also enqueued the scan. No container restart needed.0 → 1437 music videos, 198 artists, plateaued and idempotent. Matches the prior sessions local-instance prediction exactly. All 1437MediaItem.State = 0(Normal); library 16 now has itsjellyfin://e2c00f…LibraryPath.The originally-reported symptom — a music library that ingests nothing — does not reproduce. Root cause (per prior analysis, confirmed): the Jellyfin
Music Videoslibrary hadShouldSyncItems = 0, and pre-#488 a sync would have NRE-crashed anyway.Deferred (by design)
Vaporwave,Jungle,Electronic, … all 0 items) — the channels wont play until these are populated from folder-derived tags. That is #487 (blocked-by this issue, now unblocked).Note / minor side effect
The
PUTuses replace-complete-set semantics (#202 §C4a), so the untouched Standup Jellyfin library row was recreated with a new id (17 → 18), stillMediaKind 8,ShouldSyncItems = 0, zero synced items — no content impact. Flagging in case anything keyed off the old library id.Closing. Docs: no convention/route/API change (operational verification only).