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
Owner

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:

[20:15:22 ERR] Unable to rebuild playout; Collection "Vaporwave" has no valid items!
[20:15:22 WRN] Unable to build playout 28: Unable to rebuild playout; Collection "Vaporwave" has no valid items!

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/music is mounted and populated — 30 folders (Behind the Music, Electronic, Glastonbury, Habibi Funk, Classic Albums, Concert Films, …), matching the collection names exactly.

  • MusicVideo table: 0 rows.

  • Library id 3 Music Videos (MediaKind 3) exists, but has no LibraryPath row. The only configured library paths are:

    LibraryPath Library Path
    3 Movies jellyfin://f137a2dd…
    4 TV Shows jellyfin://767bffe4…
    7 Standup /data/standup
  • The affected collections confirm it — all have 0 items:

    25|Behind the Music|0    19|Electronic|0    24|Jungle|0
    26|MTV Unplugged|0       20|Vaporwave|0     21|World Music|0
    

So the Music Videos library 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/music to 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-vaapi snapshot 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

  • Evidence gathered on prod running 26.10.0.
  • Verified read-only; I did not add the library path — that is an operator/content decision (and /data/music ingestion may belong to the planned media-management scope).
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: ``` [20:15:22 ERR] Unable to rebuild playout; Collection "Vaporwave" has no valid items! [20:15:22 WRN] Unable to build playout 28: Unable to rebuild playout; Collection "Vaporwave" has no valid items! ``` 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/music` is mounted and populated — **30 folders** (`Behind the Music`, `Electronic`, `Glastonbury`, `Habibi Funk`, `Classic Albums`, `Concert Films`, …), matching the collection names exactly. - `MusicVideo` table: **0 rows**. - `Library` id 3 `Music Videos` (MediaKind 3) **exists**, but has **no `LibraryPath` row**. The only configured library paths are: | LibraryPath | Library | Path | |---|---|---| | 3 | Movies | `jellyfin://f137a2dd…` | | 4 | TV Shows | `jellyfin://767bffe4…` | | 7 | Standup | `/data/standup` | - The affected collections confirm it — all have `0` items: ``` 25|Behind the Music|0 19|Electronic|0 24|Jungle|0 26|MTV Unplugged|0 20|Vaporwave|0 21|World Music|0 ``` So the `Music Videos` library 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](http://192.168.1.95:3000/timothy/ersatztv/issues/1)): add a local library path `/data/music` to 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-vaapi` snapshot 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 - Evidence gathered on prod running `26.10.0`. - Verified read-only; I did not add the library path — that is an operator/content decision (and `/data/music` ingestion may belong to the planned `media-management` scope).
timothy added the bugpriority: medium labels 2026-07-19 20:34:46 +02:00
Author
Owner

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's startup sub-split — deferred by operator choice. #474 picked instead.

Plan: verify the live prod state read-only first (library 3 Music Videos, its missing LibraryPath, /data/music contents, and whether the path was lost vs never configured — the pre-bumblebee-vaapi snapshot 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.

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's `startup` sub-split — deferred by operator choice. #474 picked instead. Plan: verify the live prod state read-only first (library 3 `Music Videos`, its missing `LibraryPath`, `/data/music` contents, and whether the path was *lost* vs never configured — the `pre-bumblebee-vaapi` snapshot 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.
timothy added the in-progress label 2026-07-20 00:05:01 +02:00
Author
Owner

Root cause is upstream of ErsatzTV: the Jellyfin library is typed mixed, so we silently drop it

The issue body's diagnosis (missing local LibraryPath on library 3) is accurate as far as it goes, but the proposed fix — add /data/music as 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):

response.CollectionType?.ToLowerInvariant() switch
{
    "tvshows"     => … LibraryMediaKind.Shows …,
    "movies"      => … LibraryMediaKind.Movies …,
    "musicvideos" => … LibraryMediaKind.MusicVideos …,
    // TODO: ??? for music libraries
    "boxsets"     => CacheCollectionLibraryId(response.ItemId),
    _             => None
};

and ErsatzTV.Scanner/Application/Jellyfin/Commands/SynchronizeJellyfinLibraryByIdHandler.cs dispatches LibraryMediaKind.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:

Jellyfin library marker path ErsatzTV result
Movies movies.collection — ✅ synced, 309 items
TV Shows tvshows.collection — ✅ synced, 24 555 items
Music Videos mixed.collection /data/music ❌ _ => None — silently dropped
Standup mixed.collection — ❌ dropped
Explo Discovery music.collection — ❌ unsupported (// TODO)
Collections boxsets.collection — cached as collections

CollectionType for a mixed library is not one of the four handled values, so Project returns None and the library is dropped without any log line. JellyfinLibrary on 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 (MediaKind Movies) exists precisely because Jellyfin's Standup library is also mixed and 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-vaapi snapshot (2026-06-17) has the identical three LibraryPath rows (jellyfin://… ×2 + /data/standup) and MusicVideo = 0. Nothing regressed — this content was never ingested by any route. That closes the open question in the issue body.

Supporting evidence

  • /data/music is mounted and populated: 30 artist-level folders, layout <root>/<artist>/<video>.mkv + .nfo sidecars — which is exactly what both MusicVideoFolderScanner (local) and the Jellyfin scanner expect.
  • MusicVideo, Artist, OtherVideo, Song tables: 0 rows.
  • The 8 dead collections confirm it: Music Video Mix, Glastonbury Live, Hip Hop & Soul, Retro TV Music, Electronic, Vaporwave, World Music, Jungle, Behind the Music, MTV Unplugged all have 0 CollectionItem rows (Concert Films has 1). Their playouts therefore fail to build every cycle, which is the Collection "X" has no valid items! log flood.
  • No JellyfinPathReplacement rows exist. Not a problem: movies/shows stream over the Jellyfin HTTP API (/media/jellyfin/{id}), and the music-video scanner's GetLocalPath falls back to the raw path — both containers see /data/music at the same mount point.

Chosen fix (operator decision)

Delete and re-add the Music Videos library in the Jellyfin UI with content type Music 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 ERR on 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.

## Root cause is upstream of ErsatzTV: the Jellyfin library is typed `mixed`, so we silently drop it The issue body's diagnosis (missing local `LibraryPath` on library 3) is accurate as far as it goes, but the *proposed* fix — add `/data/music` as 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)`: ```csharp response.CollectionType?.ToLowerInvariant() switch { "tvshows" => … LibraryMediaKind.Shows …, "movies" => … LibraryMediaKind.Movies …, "musicvideos" => … LibraryMediaKind.MusicVideos …, // TODO: ??? for music libraries "boxsets" => CacheCollectionLibraryId(response.ItemId), _ => None }; ``` and `ErsatzTV.Scanner/Application/Jellyfin/Commands/SynchronizeJellyfinLibraryByIdHandler.cs` dispatches `LibraryMediaKind.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: | Jellyfin library | marker | path | ErsatzTV result | |---|---|---|---| | Movies | `movies.collection` | — | ✅ synced, 309 items | | TV Shows | `tvshows.collection` | — | ✅ synced, 24 555 items | | **Music Videos** | **`mixed.collection`** | `/data/music` | ❌ `_ => None` — **silently dropped** | | Standup | `mixed.collection` | — | ❌ dropped | | Explo Discovery | `music.collection` | — | ❌ unsupported (`// TODO`) | | Collections | `boxsets.collection` | — | cached as collections | `CollectionType` for a mixed library is not one of the four handled values, so `Project` returns `None` and the library is dropped **without any log line**. `JellyfinLibrary` on 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` (MediaKind `Movies`) exists precisely because Jellyfin's Standup library is *also* `mixed` and 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-vaapi` snapshot (2026-06-17) has the identical three `LibraryPath` rows (`jellyfin://…` ×2 + `/data/standup`) and `MusicVideo` = 0. Nothing regressed — this content was never ingested by any route. That closes the open question in the issue body. ### Supporting evidence - `/data/music` is mounted and populated: **30 artist-level folders**, layout `<root>/<artist>/<video>.mkv` + `.nfo` sidecars — which is exactly what both `MusicVideoFolderScanner` (local) and the Jellyfin scanner expect. - `MusicVideo`, `Artist`, `OtherVideo`, `Song` tables: **0 rows**. - The 8 dead collections confirm it: `Music Video Mix`, `Glastonbury Live`, `Hip Hop & Soul`, `Retro TV Music`, `Electronic`, `Vaporwave`, `World Music`, `Jungle`, `Behind the Music`, `MTV Unplugged` all have **0 `CollectionItem` rows** (`Concert Films` has 1). Their playouts therefore fail to build every cycle, which is the `Collection "X" has no valid items!` log flood. - No `JellyfinPathReplacement` rows exist. Not a problem: movies/shows stream over the Jellyfin HTTP API (`/media/jellyfin/{id}`), and the music-video scanner's `GetLocalPath` falls back to the raw path — both containers see `/data/music` at the same mount point. ### Chosen fix (operator decision) **Delete and re-add the `Music Videos` library in the Jellyfin UI with content type `Music 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 `ERR` on **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.
Author
Owner

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 / MusicVideo rows exist from a successful Jellyfin scan. Reviving the channels is #487's job and will not happen under this issue.

Remaining work on #474

step owner state
Delete + re-add Jellyfin Music Videos with content type Music videos operator (Jellyfin UI) ⏳ pending
POST /api/v1/media-sources/jellyfin/2/refresh-libraries this session blocked on the above
PUT /api/v1/media-sources/jellyfin/2/libraries — enable sync on the new library this session ”
POST /api/v1/libraries/{id}/scan → JellyfinMusicVideoLibraryScanner this session ”
Verify Artist / MusicVideo counts, and that the 30 folders map to sane artists this session ”

No 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 no ItemId/Etag to key on (there is no JellyfinMusicVideo entity), re-processes every item each scan, and has no deletion/trash reconciliation pass — that gets its own issue rather than widening this one.

## 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` / `MusicVideo` rows exist from a successful Jellyfin scan. Reviving the channels is #487's job and will not happen under this issue. ### Remaining work on #474 | step | owner | state | |---|---|---| | Delete + re-add Jellyfin `Music Videos` with content type `Music videos` | operator (Jellyfin UI) | ⏳ pending | | `POST /api/v1/media-sources/jellyfin/2/refresh-libraries` | this session | blocked on the above | | `PUT /api/v1/media-sources/jellyfin/2/libraries` — enable sync on the new library | this session | ” | | `POST /api/v1/libraries/{id}/scan` → `JellyfinMusicVideoLibraryScanner` | this session | ” | | Verify `Artist` / `MusicVideo` counts, and that the 30 folders map to sane artists | this session | ” | No 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 no `ItemId`/`Etag` to key on (there is no `JellyfinMusicVideo` entity), re-processes every item each scan, and has no deletion/trash reconciliation pass — that gets its own issue rather than widening this one.
Author
Owner

Correction: /data/music is genuinely mixed content, and re-typing it to musicvideos was the wrong move

Two 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/music is 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. mixed was 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 musicvideos forces shows and concert films into Artist/MusicVideo shape, 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.cs already queries items by parentId + includeItemTypes:

GetMovieLibraryItems(…,      string includeItemTypes = "Movie",      …)
GetShowLibraryItems(…,       string includeItemTypes = "Series",     …)
GetMusicVideoLibraryItems(…, string includeItemTypes = "MusicVideo", …)

parentId is just the library's ItemId. A mixed library can therefore be queried once per type, and Jellyfin returns authoritative, disjoint sets — no folder-shape inference, no NFO sniffing. JellyfinLibraryItemResponse also carries a per-item Type field ("Movie" | "Series" | "Season" | "Episode" | "MusicVideo"), which JellyfinApiClient.ProjectToCollectionMediaItem already 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 mixed in 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 LibraryMediaKind blast-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.

## Correction: `/data/music` is genuinely mixed content, and re-typing it to `musicvideos` was the wrong move Two 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/music` is 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**. `mixed` was 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 `musicvideos` forces shows and concert films into `Artist`/`MusicVideo` shape, 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.cs` already queries items by **`parentId` + `includeItemTypes`**: ```csharp GetMovieLibraryItems(…, string includeItemTypes = "Movie", …) GetShowLibraryItems(…, string includeItemTypes = "Series", …) GetMusicVideoLibraryItems(…, string includeItemTypes = "MusicVideo", …) ``` `parentId` is just the library's `ItemId`. A mixed library can therefore be queried once per type, and **Jellyfin returns authoritative, disjoint sets** — no folder-shape inference, no NFO sniffing. `JellyfinLibraryItemResponse` also carries a per-item `Type` field (`"Movie" | "Series" | "Season" | "Episode" | "MusicVideo"`), which `JellyfinApiClient.ProjectToCollectionMediaItem` already 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 `mixed` in 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 `LibraryMediaKind` blast-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.
timothy removed the in-progress label 2026-07-20 18:35:24 +02:00
Author
Owner

Status: code side is done and proven; blocked on a release + prod deploy

Releasing my claim (in-progress removed). Everything this issue needs from the codebase now exists on main; what remains is a deploy, which is outside this issue's control.

What changed since the last update

#488 merged — the ArgumentNullException that crashed every Jellyfin music-video scan is fixed
#494 merged — the scanner now reconciles removals
#489 / PR #493 merged — mixed-library support, in case /data/music is ever re-typed

Proven working, on real data

A local instance built from main scanned the live /data/music Jellyfin library end to end:

  • 1437 music videos ingested, 198 artists, zero unhandled exceptions
  • Second scan idempotent
  • The originally-reported symptom — a music library that ingests nothing — does not reproduce

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 StartedAt and 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 reference 192.168.1.99 / bumblebee are stale; that is server-management's to reconcile, not this issue's.

Remaining steps (needs a release)

  1. Cut a release containing #488 + #494 + #489, and deploy prod — verifying the deployed image by digest, not tag.
  2. Enable shouldSyncItems on the Jellyfin Music Videos library (currently typed musicvideos, which the field data supports — see below).
  3. Scan; expect ~1437 music videos.
  4. The channels will still not play until their collections are populated — that is #487, now reshaped and blocked on #497.

Content-modelling note

Typing /data/music as mixed was tried and reverted: it yields 1438 ungrouped Movies and no artists. musicvideos is 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.

## Status: code side is done and proven; blocked on a release + prod deploy Releasing my claim (`in-progress` removed). Everything this issue needs from the **codebase** now exists on `main`; what remains is a deploy, which is outside this issue's control. ### What changed since the last update | | | |---|---| | #488 | **merged** — the `ArgumentNullException` that crashed every Jellyfin music-video scan is fixed | | #494 | **merged** — the scanner now reconciles removals | | #489 / PR #493 | **merged** — mixed-library support, in case `/data/music` is ever re-typed | ### Proven working, on real data A local instance built from `main` scanned the live `/data/music` Jellyfin library end to end: - **1437 music videos** ingested, 198 artists, zero unhandled exceptions - Second scan idempotent - The originally-reported symptom — a music library that ingests nothing — does not reproduce 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 `StartedAt` and 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 reference `192.168.1.99` / bumblebee are stale; that is server-management's to reconcile, not this issue's. ### Remaining steps (needs a release) 1. Cut a release containing #488 + #494 + #489, and deploy prod — verifying the deployed image by **digest**, not tag. 2. Enable `shouldSyncItems` on the Jellyfin `Music Videos` library (currently typed `musicvideos`, which the field data supports — see below). 3. Scan; expect ~1437 music videos. 4. The channels will still not play until their collections are populated — that is #487, now reshaped and blocked on #497. ### Content-modelling note Typing `/data/music` as `mixed` was tried and reverted: it yields 1438 *ungrouped* Movies and no artists. `musicvideos` is 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.
timothy added the in-progress label 2026-07-20 23:09:27 +02:00
Author
Owner

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/:prod manifest (not just tag/StartedAt — per the #350 lesson). v26.11.0 contains #488/#494/#489/#497.

Executing the remaining steps: enable shouldSyncItems on 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.

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`/`:prod` manifest (not just tag/StartedAt — per the #350 lesson). v26.11.0 contains #488/#494/#489/#497. Executing the remaining steps: enable `shouldSyncItems` on 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.
Author
Owner

Resolved and verified live on prod ✅

The music-video ingestion defect is fixed. Executed the remaining post-deploy steps this session:

What was done

  1. Confirmed prod runs the fix — v26.11.0 deployed, verified by manifest digest (sha256:ca5e1fa1… == registry :26.11.0/:prod), not by tag/StartedAt (per the #350 lesson). Contains #488/#494/#489/#497.
  2. Enabled sync on Jellyfin library 16 (Music Videos) via the intended REST write path — PUT /api/v1/media-sources/jellyfin/2/libraries — which also enqueued the scan. No container restart needed.
  3. Scan ran clean: 0 → 1437 music videos, 198 artists, plateaued and idempotent. Matches the prior sessions local-instance prediction exactly. All 1437 MediaItem.State = 0 (Normal); library 16 now has its jellyfin://e2c00f… LibraryPath.

The originally-reported symptom — a music library that ingests nothing — does not reproduce. Root cause (per prior analysis, confirmed): the Jellyfin Music Videos library had ShouldSyncItems = 0, and pre-#488 a sync would have NRE-crashed anyway.

Deferred (by design)

  • Themed collections still empty (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 PUT uses replace-complete-set semantics (#202 §C4a), so the untouched Standup Jellyfin library row was recreated with a new id (17 → 18), still MediaKind 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).

## Resolved and verified live on prod ✅ The music-video ingestion defect is fixed. Executed the remaining post-deploy steps this session: ### What was done 1. **Confirmed prod runs the fix** — v26.11.0 deployed, verified by **manifest digest** (`sha256:ca5e1fa1…` == registry `:26.11.0`/`:prod`), not by tag/`StartedAt` (per the #350 lesson). Contains #488/#494/#489/#497. 2. **Enabled sync** on Jellyfin library 16 (Music Videos) via the intended REST write path — `PUT /api/v1/media-sources/jellyfin/2/libraries` — which also enqueued the scan. No container restart needed. 3. **Scan ran clean**: `0 → 1437 music videos, 198 artists`, plateaued and idempotent. Matches the prior sessions local-instance prediction exactly. All 1437 `MediaItem.State = 0` (Normal); library 16 now has its `jellyfin://e2c00f…` `LibraryPath`. The originally-reported symptom — a music library that ingests nothing — **does not reproduce**. Root cause (per prior analysis, confirmed): the Jellyfin `Music Videos` library had `ShouldSyncItems = 0`, and pre-#488 a sync would have NRE-crashed anyway. ### Deferred (by design) - **Themed collections still empty** (`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 `PUT` uses replace-complete-set semantics (#202 §C4a), so the untouched **Standup** Jellyfin library row was recreated with a new id (17 → 18), still `MediaKind 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).
timothy removed the in-progress label 2026-07-20 23:14:18 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: timothy/ersatztv#474