fix(web): resolve home server catalog titles loading issue - #493
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e6c7994f1d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| }, []); | ||
|
|
||
| const loadCatalogRow = useCallback((catalog: CatalogConfig) => loadCatalog(catalog, settings.language, addonsRef.current), [settings.language]); | ||
| const loadCatalogRow = useCallback((catalog: CatalogConfig) => loadCatalog(catalog, settings.language, addonsRef.current, settingsRef.current.homeServers), [settings.language]); |
There was a problem hiding this comment.
Invalidate catalog rows when home servers change
For home-server catalogs this loader now depends on settingsRef.current.homeServers, but the only caller I checked (LazyRail) still keys its 12-hour catalog cache and reload effect from the catalog/language fields, not the active profile or home-server list. When a user switches profiles or removes/replaces a server while a home-server catalog has the same id/sourceUrl, the rail can keep rendering the previous server's cached personal library instead of reloading against the new homeServers; include a home-server/profile version in that cache key or bypass the cache for these rows.
Useful? React with 👍 / 👎.
15341e7 to
e6c7994
Compare
fix(web): keep the placeholder for home server items without artwork Building an image URL unconditionally meant every Jellyfin item got a non-empty `image`, including ones the server has no artwork for. Combined with the loosened visibility filter those items reached the rails pointing at an image route that 404s. MediaCard renders a Clapperboard placeholder for an empty value but a broken <img> for a failing URL, and it skips the TMDB artwork back-fill for home-server items, so nothing recovers it. Fall back to empty instead; the items stay visible, which is the point of the filter change, and show the placeholder rather than a broken thumbnail. Plex already did this. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> @
Summary
Fixes a bug in the web application where connecting a Home Server (Jellyfin, Emby, Plex) results in empty catalogs with no titles displayed.
Root Causes & Fixes
Jellyfin API Query Field Truncation (
web/lib/homeserver.ts):Fields=Overview, which caused Jellyfin/Emby servers to omit optional fields such asImageTags,BackdropImageTags,PrimaryImageTag,ProductionYear, andCommunityRating.Fields=Overview,PrimaryImageAspectRatio,BasicSyncInfo,ImageTags,BackdropImageTags,ProductionYear,CommunityRating.Session Authentication Fallback (
web/lib/homeserver.ts):ensureSession()now immediately returns{ token, userId }when both are present on the config.api_key=${encodeURIComponent(server.token)}parameter for/Users/Meand/Usersendpoints.Collection Type Matching (
web/lib/homeserver.ts):v.CollectionType === "movies" || v.CollectionType === "tvshows"withisVideoCollectionType()to prevent libraries with non-standard collection type descriptors (or missing descriptors) from being dropped.Home Server Catalog Source Support (
web/lib/tmdb.ts&web/lib/store.tsx):catalog.sourceType === "home-server"inloadCatalog()andHOME_SERVERcollection sources inloadCollectionSource().homeServersthroughloadCatalogRow()instore.tsx.Item Mapping & Filtering (
web/lib/homeserver.ts):mapItem()to check bothitem.ImageTags?.Primaryanditem.PrimaryImageTag.Boolean(m && m.title)so items without pre-cached artwork remain visible in catalog rails.