fix: artwork fallbacks everywhere and hero layout

- resolveItemImage(): try the item's own images, then series/album/parent artwork
- hero sidebar tickers fall back from Thumb to Backdrop/Primary instead of an icon
- hero background falls back to the poster when no backdrop exists
- stop stacked slides when the carousel advances (drop leaking AnimatePresence)
- keep the hero title/logo inside the slide on narrow windows
- sensible slides-per-view on tablet/mobile widths
This commit is contained in:
1xDed committed 2026-11-27 03:11:17 +03:00
1 parent 1c499f42ec
commit 5a9b3ad273
7 files changed
+197 -34

No files matched your search

+12 -6
View File
@@ -61,6 +61,16 @@ const CarouselSlide = ({ item }: { item: BaseItemDto }) => {
const [animationDirection] = useCarouselStore((state) => [state.direction]);
// Hero background: a real backdrop when the item has one, otherwise fall back
// to the poster instead of a big type icon.
const heroBackgroundSrc = item.BackdropImageTags?.length
? item.ParentBackdropItemId
? `${api?.basePath}/Items/${item.ParentBackdropItemId}/Images/Backdrop?quality=80`
: `${api?.basePath}/Items/${item.Id}/Images/Backdrop?quality=80&fillHeight=1400`
: item.ImageTags?.Primary
? `${api?.basePath}/Items/${item.Id}/Images/Primary?quality=80&fillHeight=1400`
: undefined;
return (
<div className="hero-carousel-slide">
<motion.div
@@ -70,15 +80,11 @@ const CarouselSlide = ({ item }: { item: BaseItemDto }) => {
exit={{ opacity: 0 }}
transition={{ duration: 0.4, ease: "easeInOut" }}
>
{item.BackdropImageTags?.length ? (
{heroBackgroundSrc ? (
<img
alt={item.Name ?? "item"}
className="hero-carousel-background-image"
src={
item.ParentBackdropItemId
? `${api?.basePath}/Items/${item.ParentBackdropItemId}/Images/Backdrop?quality=80`
: `${api?.basePath}/Items/${item.Id}/Images/Backdrop?quality=80&fillHeight=1400`
}
src={heroBackgroundSrc}
style={{
opacity: 0,
}}