From bf518b4834d447e89335918a2c0a62e5efbe38af Mon Sep 17 00:00:00 2001 From: Fredrik Burmester Date: Fri, 30 Jan 2026 20:45:00 +0100 Subject: [PATCH] fix(tv): poster images --- components/home/Home.tv.tsx | 11 ++++++++--- components/tv/TVPosterCard.tsx | 12 ++++++------ 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/components/home/Home.tv.tsx b/components/home/Home.tv.tsx index 6ce36e82..edea23d3 100644 --- a/components/home/Home.tv.tsx +++ b/components/home/Home.tv.tsx @@ -250,7 +250,7 @@ export const Home = () => { deduped.push(item); } - return deduped.slice(0, 8); + return deduped.slice(0, 15); }, enabled: !!api && !!user?.Id, staleTime: 60 * 1000, @@ -539,9 +539,14 @@ export const Home = () => { }, [heroItems, settings.showTVHeroCarousel]); // Get sections that will actually be rendered (accounting for hero slicing) + // When hero is shown, skip the first sections since hero already displays that content + // - If mergeNextUpAndContinueWatching: skip 1 section (combined Continue & Next Up) + // - Otherwise: skip 2 sections (separate Continue Watching + Next Up) const renderedSections = useMemo(() => { - return showHero ? sections.slice(1) : sections; - }, [sections, showHero]); + if (!showHero) return sections; + const sectionsToSkip = settings.mergeNextUpAndContinueWatching ? 1 : 2; + return sections.slice(sectionsToSkip); + }, [sections, showHero, settings.mergeNextUpAndContinueWatching]); if (!isConnected || serverConnected !== true) { let title = ""; diff --git a/components/tv/TVPosterCard.tsx b/components/tv/TVPosterCard.tsx index d27bc4f6..c8259838 100644 --- a/components/tv/TVPosterCard.tsx +++ b/components/tv/TVPosterCard.tsx @@ -133,16 +133,16 @@ export const TVPosterCard: React.FC = ({ // Horizontal orientation: prefer thumbs/backdrops for landscape images if (orientation === "horizontal") { - // Episode: prefer episode's own primary image, fall back to parent thumb + // Episode: prefer series thumb image for consistent look (like hero section) if (item.Type === "Episode") { - // First try episode's own primary image - if (item.ImageTags?.Primary) { - return `${api.basePath}/Items/${item.Id}/Images/Primary?fillHeight=600&quality=80&tag=${item.ImageTags.Primary}`; - } - // Fall back to parent thumb if episode has no image + // First try parent/series thumb (horizontal series artwork) if (item.ParentBackdropItemId && item.ParentThumbImageTag) { return `${api.basePath}/Items/${item.ParentBackdropItemId}/Images/Thumb?fillHeight=700&quality=80&tag=${item.ParentThumbImageTag}`; } + // Fall back to episode's own primary image + if (item.ImageTags?.Primary) { + return `${api.basePath}/Items/${item.Id}/Images/Primary?fillHeight=600&quality=80&tag=${item.ImageTags.Primary}`; + } // Last resort: try primary without tag return `${api.basePath}/Items/${item.Id}/Images/Primary?fillHeight=700&quality=80`; }