mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-05-23 23:36:54 +01:00
feat(tv): add setting to show series poster on episode detail pages
This commit is contained in:
@@ -63,17 +63,24 @@ const HeroCard: React.FC<HeroCardProps> = React.memo(
|
||||
|
||||
const posterUrl = useMemo(() => {
|
||||
if (!api) return null;
|
||||
// Try thumb first, then primary
|
||||
|
||||
// For episodes, always use series thumb
|
||||
if (item.Type === "Episode") {
|
||||
if (item.ParentThumbImageTag) {
|
||||
return `${api.basePath}/Items/${item.ParentBackdropItemId}/Images/Thumb?fillHeight=400&quality=80&tag=${item.ParentThumbImageTag}`;
|
||||
}
|
||||
if (item.SeriesId) {
|
||||
return `${api.basePath}/Items/${item.SeriesId}/Images/Thumb?fillHeight=400&quality=80`;
|
||||
}
|
||||
}
|
||||
|
||||
// For non-episodes, use item's own thumb/primary
|
||||
if (item.ImageTags?.Thumb) {
|
||||
return `${api.basePath}/Items/${item.Id}/Images/Thumb?fillHeight=400&quality=80&tag=${item.ImageTags.Thumb}`;
|
||||
}
|
||||
if (item.ImageTags?.Primary) {
|
||||
return `${api.basePath}/Items/${item.Id}/Images/Primary?fillHeight=400&quality=80&tag=${item.ImageTags.Primary}`;
|
||||
}
|
||||
// For episodes, use series thumb
|
||||
if (item.Type === "Episode" && item.ParentThumbImageTag) {
|
||||
return `${api.basePath}/Items/${item.ParentBackdropItemId}/Images/Thumb?fillHeight=400&quality=80&tag=${item.ParentThumbImageTag}`;
|
||||
}
|
||||
return null;
|
||||
}, [api, item]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user