mirror of
https://github.com/movie-web/movie-web.git
synced 2024-12-27 10:11:48 +01:00
fix(meta): fallback to no "_latest"
This commit is contained in:
parent
935cb2427b
commit
ca6383900a
@ -56,9 +56,13 @@ export async function getMetaFromId(
|
||||
|
||||
const imdbId = data.external_ids.find(
|
||||
(v) => v.provider === "imdb_latest"
|
||||
)?.external_id ?? data.external_ids.find(
|
||||
(v) => v.provider === "imdb"
|
||||
)?.external_id;
|
||||
const tmdbId = data.external_ids.find(
|
||||
(v) => v.provider === "tmdb_latest"
|
||||
)?.external_id ?? data.external_ids.find(
|
||||
(v) => v.provider === "tmdb"
|
||||
)?.external_id;
|
||||
|
||||
if (!imdbId || !tmdbId) throw new Error("not enough info");
|
||||
|
Loading…
Reference in New Issue
Block a user