mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-02-01 07:58:08 +00:00
fix(tv): poster images
This commit is contained in:
@@ -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 = "";
|
||||
|
||||
@@ -133,16 +133,16 @@ export const TVPosterCard: React.FC<TVPosterCardProps> = ({
|
||||
|
||||
// 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`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user