fix(web+api): library picker artwork URLs + season drill-in instead of tile flooding (#180) #181

Merged
timothy merged 3 commits from fix/180-library-picker into main 2026-07-07 22:00:39 +02:00
Owner

Fixes both halves of #180 (do not auto-close; manual close after verification).

(B) Broken artwork — root cause: GetLibraryBrowseItemsHandler.Artwork() returned Blazor-convention values (bare cache filename, or relative jellyfin/{id}?fillHeight=440); Blazor prefixes with artwork/posters/ + <base href="/">, but the SPA renders item.artwork raw from under /app/ → every tile 404'd. Handler now returns rooted URLs (/artwork/posters/... / /artwork/thumbnails/... per ArtworkKind, jellyfin/emby proxy routes with fillHeight/maxHeight, http(s) passthrough). Seasons fall back to the parent show's poster. Fixes ChannelBuilder, MediaBrowseScreen, and CollectionsScreen at once.

(A) Season flooding: TelevisionSeason removed from ChannelBuilder's top-level fan-out; show tiles gain a "Seasons" drill-in dialog backed by new optional parentId query param on GET /api/library/browse (direct DB query, season-number order). CollectionsScreen add-items dialog excludes seasons by default behind a media-kind filter chip row.

Contract: one new optional query param parentId on GET /api/library/browse; response DTO unchanged; v1.json regenerated (v1.d.ts unchanged — generator emits schemas only).

Tests: ErsatzTV.Tests 788 green (LibraryBrowse 11→13), Core.Tests 493 green, web 306 green (new libraryBrowse + ChannelBuilder tests, collections dialog tests split), lint clean.

🤖 Generated with Claude Code

Fixes both halves of #180 (do not auto-close; manual close after verification). **(B) Broken artwork — root cause**: `GetLibraryBrowseItemsHandler.Artwork()` returned Blazor-convention values (bare cache filename, or relative `jellyfin/{id}?fillHeight=440`); Blazor prefixes with `artwork/posters/` + `<base href="/">`, but the SPA renders `item.artwork` raw from under `/app/` → every tile 404'd. Handler now returns rooted URLs (`/artwork/posters/...` / `/artwork/thumbnails/...` per ArtworkKind, jellyfin/emby proxy routes with fillHeight/maxHeight, http(s) passthrough). Seasons fall back to the parent show's poster. Fixes ChannelBuilder, MediaBrowseScreen, and CollectionsScreen at once. **(A) Season flooding**: `TelevisionSeason` removed from ChannelBuilder's top-level fan-out; show tiles gain a "Seasons" drill-in dialog backed by new optional `parentId` query param on `GET /api/library/browse` (direct DB query, season-number order). CollectionsScreen add-items dialog excludes seasons by default behind a media-kind filter chip row. **Contract**: one new optional query param `parentId` on GET /api/library/browse; response DTO unchanged; v1.json regenerated (v1.d.ts unchanged — generator emits schemas only). **Tests**: ErsatzTV.Tests 788 green (LibraryBrowse 11→13), Core.Tests 493 green, web 306 green (new libraryBrowse + ChannelBuilder tests, collections dialog tests split), lint clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
timothy added 2 commits 2026-07-07 21:43:43 +02:00
Part of the #180 library picker fixes (API side).

Broken artwork: GetLibraryBrowseItemsHandler.Artwork returned Blazor-convention
values (a bare cache filename, or a RELATIVE jellyfin/emby proxy path). Blazor's
GetPosterUrl prefixes those with "artwork/posters/" against <base href="/">, but
the React SPA renders item.artwork raw as <img src> from under /app/, so every
image 404'd. The handler now returns rooted, directly-usable URLs
(/artwork/posters/... or /artwork/thumbnails/... per ArtworkKind; jellyfin/emby
mapped to their proxy routes with fillHeight/maxHeight; absolute http(s) URLs
passed through; empty stays empty).

Seasons with no poster of their own now fall back to the parent show's poster
(SeasonArtwork + the extra ShowMetadata.Artwork include).

Season drill-in: GET /api/library/browse gains an optional `parentId` query
param that, with mediaType=TelevisionSeason, returns that show's seasons
(season-number order, bypassing Lucene) so the SPA can expand a show into its
seasons. OpenAPI spec regenerated.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
fix(web): stop season-tile flooding in channel builder and collections (#180)
Build ErsatzTV Image / Build & test (.NET) (pull_request) Successful in 5m8s
Build ErsatzTV Image / EF migration integrity (SQLite + MySql) (pull_request) Successful in 5m16s
Build ErsatzTV Image / Build & push image (amd64) (pull_request) Has been skipped
d05e442605
Part of the #180 library picker fixes (SPA side).

Channel builder: TelevisionSeason is removed from the library grid fan-out, so a
multi-season show renders as one tile instead of one tile per season. Show tiles
gain a "Seasons" drill-in affordance (both grid and compact layouts) that opens a
dialog listing that show's seasons (via the new GET /api/library/browse?parentId=
&mediaType=TelevisionSeason), each with title, artwork and an Add button that
drops the specific season into the lineup.

Collections add-items dialog: the default search fan-out now excludes seasons,
and a media-kind filter row (All / Movies / Shows / Seasons / Artists,
default = All-without-seasons) keeps seasons reachable when explicitly selected.

Client: getLibraryBrowseItems gains an optional parentId param. Tests cover the
param mapping, the builder no longer requesting TelevisionSeason, and the
collections dialog default-excluding vs explicitly-including seasons.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
timothy added 1 commit 2026-07-07 21:50:20 +02:00
docs(api): describe library-browse parentId param in OpenAPI (#180 review)
Build ErsatzTV Image / Build & test (.NET) (pull_request) Successful in 4m38s
Build ErsatzTV Image / EF migration integrity (SQLite + MySql) (pull_request) Successful in 4m53s
Build ErsatzTV Image / Build & push image (amd64) (pull_request) Has been skipped
82d3b586f2
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
timothy merged commit 3ec3ab5fe0 into main 2026-07-07 22:00:39 +02:00
timothy deleted branch fix/180-library-picker 2026-07-07 22:00:39 +02:00
Sign in to join this conversation.