diff --git a/src/backend/metadata/getmeta.ts b/src/backend/metadata/getmeta.ts index b347e720..21b6843a 100644 --- a/src/backend/metadata/getmeta.ts +++ b/src/backend/metadata/getmeta.ts @@ -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(), }; } diff --git a/src/components/media/MediaCard.tsx b/src/components/media/MediaCard.tsx index fd460bb7..c38b4a2b 100644 --- a/src/components/media/MediaCard.tsx +++ b/src/components/media/MediaCard.tsx @@ -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 ? (