From ca6383900a68580db39dde2bcb3337fefda480e9 Mon Sep 17 00:00:00 2001 From: cloud <62519659+lem6ns@users.noreply.github.com> Date: Thu, 9 Mar 2023 19:22:41 -0700 Subject: [PATCH] fix(meta): fallback to no "_latest" --- src/backend/metadata/getmeta.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/backend/metadata/getmeta.ts b/src/backend/metadata/getmeta.ts index cb622e3b..2cc8c91b 100644 --- a/src/backend/metadata/getmeta.ts +++ b/src/backend/metadata/getmeta.ts @@ -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");