mirror of
https://github.com/sussy-code/smov.git
synced 2024-12-29 16:07:40 +01:00
directly get poster url
This commit is contained in:
parent
7c3d4aac27
commit
dccab9b0bf
2 changed files with 4 additions and 6 deletions
|
@ -7,6 +7,7 @@ import {
|
|||
getEpisodes,
|
||||
getExternalIds,
|
||||
getMediaDetails,
|
||||
getMediaPoster,
|
||||
mediaTypeToTMDB,
|
||||
} from "./tmdb";
|
||||
import {
|
||||
|
@ -56,7 +57,7 @@ export function formatTMDBMetaResult(
|
|||
id: details.id,
|
||||
title: movie.title,
|
||||
object_type: mediaTypeToTMDB(type),
|
||||
poster: movie.poster_path ?? undefined,
|
||||
poster: getMediaPoster(movie.poster_path) ?? undefined,
|
||||
original_release_year: new Date(movie.release_date).getFullYear(),
|
||||
};
|
||||
}
|
||||
|
|
|
@ -2,8 +2,7 @@ import { useTranslation } from "react-i18next";
|
|||
import { Link } from "react-router-dom";
|
||||
|
||||
import { TMDBMediaToId } from "@/backend/metadata/getmeta";
|
||||
import { getMediaPoster } from "@/backend/metadata/tmdb";
|
||||
import { MWMediaMeta } from "@/backend/metadata/types";
|
||||
import { MWMediaMeta } from "@/backend/metadata/types/mw";
|
||||
import { DotList } from "@/components/text/DotList";
|
||||
|
||||
import { IconPatch } from "../buttons/IconPatch";
|
||||
|
@ -56,9 +55,7 @@ function MediaCardContent({
|
|||
closable ? "" : "group-hover:rounded-lg",
|
||||
].join(" ")}
|
||||
style={{
|
||||
backgroundImage: media.poster
|
||||
? `url(${getMediaPoster(media.poster)})`
|
||||
: undefined,
|
||||
backgroundImage: media.poster ? `url(${media.poster})` : undefined,
|
||||
}}
|
||||
>
|
||||
{series ? (
|
||||
|
|
Loading…
Reference in a new issue