fix: album not displaying if no parent backdrop is found
This commit is contained in:
3 files changed
+29
-7
No files matched your search
@@ -215,7 +215,7 @@ const MusicAlbumTitlePage = () => {
|
|||||||
>
|
>
|
||||||
<div className="item-hero flex flex-row">
|
<div className="item-hero flex flex-row">
|
||||||
<div className="item-hero-backdrop-container">
|
<div className="item-hero-backdrop-container">
|
||||||
{item.data.BackdropImageTags ? (
|
{item.data.ParentBackdropImageTags?.length ? (
|
||||||
<motion.img
|
<motion.img
|
||||||
alt={item.data.Name}
|
alt={item.data.Name}
|
||||||
src={api.getItemImageUrl(
|
src={api.getItemImageUrl(
|
||||||
|
|||||||
@@ -30,9 +30,9 @@ import { getUserLibraryApi } from "@jellyfin/sdk/lib/utils/api/user-library-api"
|
|||||||
|
|
||||||
import { useQuery } from "@tanstack/react-query";
|
import { useQuery } from "@tanstack/react-query";
|
||||||
|
|
||||||
|
import heroBg from "../../assets/herobg.png";
|
||||||
import { Card } from "../../components/card/card";
|
import { Card } from "../../components/card/card";
|
||||||
import { CardScroller } from "../../components/cardScroller/cardScroller";
|
import { CardScroller } from "../../components/cardScroller/cardScroller";
|
||||||
import Hero from "../../components/layouts/item/hero";
|
|
||||||
|
|
||||||
import LikeButton from "../../components/buttons/likeButton";
|
import LikeButton from "../../components/buttons/likeButton";
|
||||||
import MarkPlayedButton from "../../components/buttons/markPlayedButton";
|
import MarkPlayedButton from "../../components/buttons/markPlayedButton";
|
||||||
@@ -282,7 +282,7 @@ const EpisodeTitlePage = () => {
|
|||||||
>
|
>
|
||||||
<div className="item-hero">
|
<div className="item-hero">
|
||||||
<div className="item-hero-backdrop-container">
|
<div className="item-hero-backdrop-container">
|
||||||
{item.data.BackdropImageTags ? (
|
{item.data.ParentBackdropImageTags?.length ? (
|
||||||
<motion.img
|
<motion.img
|
||||||
alt={item.data.Name}
|
alt={item.data.Name}
|
||||||
src={api.getItemImageUrl(
|
src={api.getItemImageUrl(
|
||||||
@@ -301,7 +301,17 @@ const EpisodeTitlePage = () => {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<></>
|
<motion.img
|
||||||
|
alt={item.data.Name}
|
||||||
|
src={heroBg}
|
||||||
|
className="item-hero-backdrop"
|
||||||
|
onLoad={(e) => {
|
||||||
|
e.currentTarget.style.opacity = 1;
|
||||||
|
}}
|
||||||
|
style={{
|
||||||
|
y: parallax,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ import "./series.module.scss";
|
|||||||
|
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import { NavLink } from "react-router-dom";
|
import { NavLink } from "react-router-dom";
|
||||||
|
import heroBg from "../../assets/herobg.png";
|
||||||
import LikeButton from "../../components/buttons/likeButton";
|
import LikeButton from "../../components/buttons/likeButton";
|
||||||
import MarkPlayedButton from "../../components/buttons/markPlayedButton";
|
import MarkPlayedButton from "../../components/buttons/markPlayedButton";
|
||||||
import PlayButton from "../../components/buttons/playButton";
|
import PlayButton from "../../components/buttons/playButton";
|
||||||
@@ -388,7 +388,17 @@ const SeriesTitlePage = () => {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<></>
|
<motion.img
|
||||||
|
alt={item.data.Name}
|
||||||
|
src={heroBg}
|
||||||
|
className="item-hero-backdrop"
|
||||||
|
onLoad={(e) => {
|
||||||
|
e.currentTarget.style.opacity = 1;
|
||||||
|
}}
|
||||||
|
style={{
|
||||||
|
y: parallax,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
)}
|
)}
|
||||||
</AnimatePresence>
|
</AnimatePresence>
|
||||||
</div>
|
</div>
|
||||||
@@ -421,7 +431,9 @@ const SeriesTitlePage = () => {
|
|||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<></>
|
<div className="item-hero-image-icon">
|
||||||
|
{getTypeIcon(item.data.Type)}
|
||||||
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="item-hero-detail">
|
<div className="item-hero-detail">
|
||||||
|
|||||||
Reference in new issue
Block a user