mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-07-31 14:33:50 -04:00
Use poster for movies in entry line
This commit is contained in:
parent
ff4155de5e
commit
8a9cf9fa1a
@ -29,6 +29,7 @@ export const EntryLine = ({
|
|||||||
serieSlug,
|
serieSlug,
|
||||||
name,
|
name,
|
||||||
thumbnail,
|
thumbnail,
|
||||||
|
poster,
|
||||||
description,
|
description,
|
||||||
displayNumber,
|
displayNumber,
|
||||||
airDate,
|
airDate,
|
||||||
@ -44,6 +45,7 @@ export const EntryLine = ({
|
|||||||
name: string | null;
|
name: string | null;
|
||||||
description: string | null;
|
description: string | null;
|
||||||
thumbnail: KImage | null;
|
thumbnail: KImage | null;
|
||||||
|
poster?: KImage | null;
|
||||||
airDate: Date | null;
|
airDate: Date | null;
|
||||||
runtime: number | null;
|
runtime: number | null;
|
||||||
watchedPercent: number | null;
|
watchedPercent: number | null;
|
||||||
@ -81,12 +83,12 @@ export const EntryLine = ({
|
|||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<ImageBackground
|
<ImageBackground
|
||||||
src={thumbnail}
|
src={poster ?? thumbnail}
|
||||||
quality="low"
|
quality="low"
|
||||||
alt=""
|
alt=""
|
||||||
layout={{
|
layout={{
|
||||||
width: percent(18),
|
width: percent(18),
|
||||||
aspectRatio: 16 / 9,
|
aspectRatio: poster ? 2 / 3 : 16 / 9,
|
||||||
}}
|
}}
|
||||||
{...(css({ flexShrink: 0, m: ts(1), borderRadius: 6 }) as any)}
|
{...(css({ flexShrink: 0, m: ts(1), borderRadius: 6 }) as any)}
|
||||||
>
|
>
|
||||||
@ -105,7 +107,9 @@ export const EntryLine = ({
|
|||||||
>
|
>
|
||||||
{/* biome-ignore lint/a11y/useValidAriaValues: simply use H6 for the style but keep a P */}
|
{/* biome-ignore lint/a11y/useValidAriaValues: simply use H6 for the style but keep a P */}
|
||||||
<H6 aria-level={undefined} {...css([{ flexShrink: 1 }, "title"])}>
|
<H6 aria-level={undefined} {...css([{ flexShrink: 1 }, "title"])}>
|
||||||
{[displayNumber, name ?? t("show.episodeNoMetadata")].join(" · ")}
|
{[displayNumber, name ?? t("show.episodeNoMetadata")]
|
||||||
|
.filter((x) => x)
|
||||||
|
.join(" · ")}
|
||||||
</H6>
|
</H6>
|
||||||
<View {...css({ flexDirection: "row", alignItems: "center" })}>
|
<View {...css({ flexDirection: "row", alignItems: "center" })}>
|
||||||
<SubP>
|
<SubP>
|
||||||
|
@ -8,7 +8,7 @@ export const entryDisplayNumber = (entry: Entry) => {
|
|||||||
case "episode":
|
case "episode":
|
||||||
return `S${entry.seasonNumber}:E${entry.episodeNumber}`;
|
return `S${entry.seasonNumber}:E${entry.episodeNumber}`;
|
||||||
case "special":
|
case "special":
|
||||||
return `SP${entry.number}`
|
return `SP${entry.number}`;
|
||||||
case "movie":
|
case "movie":
|
||||||
return "";
|
return "";
|
||||||
default:
|
default:
|
||||||
|
@ -42,7 +42,7 @@ export const ImageBackground = ({
|
|||||||
}}
|
}}
|
||||||
placeholder={{ blurhash: src?.blurhash }}
|
placeholder={{ blurhash: src?.blurhash }}
|
||||||
accessibilityLabel={alt}
|
accessibilityLabel={alt}
|
||||||
{...(css(layout, props) as any)}
|
{...(css([layout, { overflow: "hidden" }], props) as any)}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user