diff --git a/src/backend/metadata/getmeta.ts b/src/backend/metadata/getmeta.ts index 215448e5..6b3b9a30 100644 --- a/src/backend/metadata/getmeta.ts +++ b/src/backend/metadata/getmeta.ts @@ -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( 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() ?? ""; diff --git a/src/backend/providers/gdriveplayer.ts b/src/backend/providers/gdriveplayer.ts index 2023b67d..5478b6ed 100644 --- a/src/backend/providers/gdriveplayer.ts +++ b/src/backend/providers/gdriveplayer.ts @@ -41,6 +41,7 @@ registerProvider({ type: [MWMediaType.MOVIE], async scrape({ progress, media: { imdbId } }) { + if (!imdbId) throw new Error("not enough info"); progress(10); const streamRes = await proxiedFetch( "https://database.gdriveplayer.us/player.php", diff --git a/src/backend/providers/hdwatched.ts b/src/backend/providers/hdwatched.ts index cacaec41..2096e160 100644 --- a/src/backend/providers/hdwatched.ts +++ b/src/backend/providers/hdwatched.ts @@ -123,6 +123,7 @@ registerProvider({ type: [MWMediaType.MOVIE, MWMediaType.SERIES], async scrape(options) { const { media, progress } = options; + if (!media.imdbId) throw new Error("not enough info"); if (!this.type.includes(media.meta.type)) { throw new Error("Unsupported type"); }