|
|
|
@ -29,8 +29,8 @@ interface JWDetailedMeta extends JWMediaResult {
@@ -29,8 +29,8 @@ interface JWDetailedMeta extends JWMediaResult {
|
|
|
|
|
|
|
|
|
|
export interface DetailedMeta { |
|
|
|
|
meta: MWMediaMeta; |
|
|
|
|
tmdbId: string; |
|
|
|
|
imdbId: string; |
|
|
|
|
imdbId?: string; |
|
|
|
|
tmdbId?: string; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
export async function getMetaFromId( |
|
|
|
@ -67,8 +67,6 @@ export async function getMetaFromId(
@@ -67,8 +67,6 @@ export async function getMetaFromId(
|
|
|
|
|
if (!tmdbId) |
|
|
|
|
tmdbId = data.external_ids.find((v) => v.provider === "tmdb")?.external_id; |
|
|
|
|
|
|
|
|
|
if (!imdbId || !tmdbId) throw new Error("not enough info"); |
|
|
|
|
|
|
|
|
|
let seasonData: JWSeasonMetaResult | undefined; |
|
|
|
|
if (data.object_type === "show") { |
|
|
|
|
const seasonToScrape = seasonId ?? data.seasons?.[0].id.toString() ?? ""; |
|
|
|
|