show poster in bookmarks

This commit is contained in:
castdrian 2023-06-15 08:30:05 +02:00 committed by Adrian Castro
parent 06eb8e6b6d
commit c9bac3ed68
2 changed files with 10 additions and 3 deletions

View File

@ -53,7 +53,9 @@ export function fromatTMDBMetaResult(
id: details.id,
title: (details as TMDBMovieData).title,
object_type: mediaTypeToTMDB(type),
poster: (details as TMDBMovieData).poster_path ?? undefined,
poster:
Tmdb.getMediaPoster((details as TMDBMovieData).poster_path) ??
undefined,
original_release_year: Number(
(details as TMDBMovieData).release_date?.split("-")[0]
),
@ -69,7 +71,9 @@ export function fromatTMDBMetaResult(
season_number: v.season_number,
title: v.name,
})),
poster: (details as TMDBMovieData).poster_path ?? undefined,
poster:
Tmdb.getMediaPoster((details as TMDBMovieData).poster_path) ??
undefined,
original_release_year: Number(
(details as TMDBShowData).first_air_date?.split("-")[0]
),

View File

@ -2,6 +2,7 @@ import { useTranslation } from "react-i18next";
import { Link } from "react-router-dom";
import { TMDBMediaToId } from "@/backend/metadata/getmeta";
import { Tmdb } from "@/backend/metadata/tmdb";
import { MWMediaMeta } from "@/backend/metadata/types";
import { DotList } from "@/components/text/DotList";
@ -55,7 +56,9 @@ function MediaCardContent({
closable ? "" : "group-hover:rounded-lg",
].join(" ")}
style={{
backgroundImage: media.poster ? `url(${media.poster})` : undefined,
backgroundImage: media.poster
? `url(${Tmdb.getMediaPoster(media.poster)})`
: undefined,
}}
>
{series ? (