From 4606b9718ee56200f44b0ffa24116132ca59a52f Mon Sep 17 00:00:00 2001 From: Fredrik Burmester Date: Sun, 25 Jan 2026 20:18:12 +0100 Subject: [PATCH] feat(tv): swap layout and add horizontal posters for episodes --- components/ItemContent.tv.tsx | 82 ++++++++++++++++++++++------------- 1 file changed, 52 insertions(+), 30 deletions(-) diff --git a/components/ItemContent.tv.tsx b/components/ItemContent.tv.tsx index 999d6037..c8cde42c 100644 --- a/components/ItemContent.tv.tsx +++ b/components/ItemContent.tv.tsx @@ -386,6 +386,17 @@ export const ItemContentTV: React.FC = React.memo( return getPrimaryImageUrlById({ api, id: seasonId, width: 300 }); }, [api, item?.Type, item?.SeasonId, item?.ParentId]); + // Episode thumbnail URL - 16:9 horizontal image for episode items + const episodeThumbnailUrl = useMemo(() => { + if (item?.Type !== "Episode" || !api) return null; + // Use parent backdrop thumb if available (series/season thumbnail) + 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 primary image (which is usually 16:9 for episodes) + return `${api.basePath}/Items/${item.Id}/Images/Primary?fillHeight=700&quality=80`; + }, [api, item]); + // Determine which option button is the last one (for focus guide targeting) const lastOptionButton = useMemo(() => { const hasSubtitleOption = @@ -456,36 +467,7 @@ export const ItemContentTV: React.FC = React.memo( minHeight: SCREEN_HEIGHT * 0.45, }} > - {/* Left side - Poster */} - - - - - - - {/* Right side - Content */} + {/* Left side - Content */} {/* Logo or Title */} {logoUrl ? ( @@ -733,6 +715,46 @@ export const ItemContentTV: React.FC = React.memo( /> )} + + {/* Right side - Poster */} + + + {item.Type === "Episode" && episodeThumbnailUrl ? ( + + ) : ( + + )} + + {/* Additional info section */}