From 73d72c634f3c2bdf8cb6ec961df747d1d9063599 Mon Sep 17 00:00:00 2001 From: Kevin Midboe Date: Fri, 27 Feb 2026 18:34:38 +0100 Subject: [PATCH] Fix TV show posters to display show artwork instead of episode thumbnails When displaying recently added TV content, use the show's poster and metadata instead of the individual episode's thumbnail and info. Changes to processLibraryItem(): - Poster logic: For TV shows, prioritize grandparentThumb (show poster) over thumb (episode thumbnail) - Title: Use grandparentTitle (show name) instead of title (episode name) - Year: Use grandparentYear (show year) instead of episode year - Also applied same logic to music (use album/artist artwork) Before: - Shows displayed with episode-specific thumbnails - Episode titles shown instead of show titles - Inconsistent visual presentation After: - Shows display with proper show posters - Show titles and years displayed correctly - Consistent, professional library presentation - Better visual recognition of TV series This matches user expectations when browsing recently added TV content, showing the series artwork rather than individual episode stills. --- src/utils/plexHelpers.ts | 41 ++++++++++++++++++++++++++++++++++------ 1 file changed, 35 insertions(+), 6 deletions(-) diff --git a/src/utils/plexHelpers.ts b/src/utils/plexHelpers.ts index a741298..228c152 100644 --- a/src/utils/plexHelpers.ts +++ b/src/utils/plexHelpers.ts @@ -61,10 +61,28 @@ export function processLibraryItem( ) { // Get poster/thumbnail URL let posterUrl = null; - if (item.thumb) { - posterUrl = `${serverUrl}${item.thumb}?X-Plex-Token=${authToken}`; - } else if (item.grandparentThumb) { - posterUrl = `${serverUrl}${item.grandparentThumb}?X-Plex-Token=${authToken}`; + + // For TV shows, prefer grandparentThumb (show poster) over thumb (episode thumbnail) + if (libraryType === "shows") { + if (item.grandparentThumb) { + posterUrl = `${serverUrl}${item.grandparentThumb}?X-Plex-Token=${authToken}`; + } else if (item.thumb) { + posterUrl = `${serverUrl}${item.thumb}?X-Plex-Token=${authToken}`; + } + } + // For music, prefer grandparentThumb (artist/album) over thumb + else if (libraryType === "music") { + if (item.grandparentThumb) { + posterUrl = `${serverUrl}${item.grandparentThumb}?X-Plex-Token=${authToken}`; + } else if (item.thumb) { + posterUrl = `${serverUrl}${item.thumb}?X-Plex-Token=${authToken}`; + } + } + // For movies and other types, use thumb + else { + if (item.thumb) { + posterUrl = `${serverUrl}${item.thumb}?X-Plex-Token=${authToken}`; + } } // Build Plex Web App URL @@ -76,9 +94,20 @@ export function processLibraryItem( plexUrl = `https://app.plex.tv/desktop/#!/server/${machineIdentifier}/details?key=${encodedKey}`; } + // For shows, use grandparent data (show info) instead of episode info + const title = + libraryType === "shows" && item.grandparentTitle + ? item.grandparentTitle + : item.title; + + const year = + libraryType === "shows" && item.grandparentYear + ? item.grandparentYear + : item.year || item.parentYear || new Date().getFullYear(); + const baseItem = { - title: item.title, - year: item.year || item.parentYear || new Date().getFullYear(), + title, + year, poster: posterUrl, fallbackIcon: getLibraryIcon(libraryType), rating: item.rating ? Math.round(item.rating * 10) / 10 : null,