diff --git a/src/providers/sources/vidsrcto/index.ts b/src/providers/sources/vidsrcto/index.ts index c6c9fb51..cd6076e2 100644 --- a/src/providers/sources/vidsrcto/index.ts +++ b/src/providers/sources/vidsrcto/index.ts @@ -11,11 +11,11 @@ const vidSrcToBase = 'https://vidsrc.to'; const referer = `${vidSrcToBase}/`; const universalScraper = async (ctx: ShowScrapeContext | MovieScrapeContext): Promise => { - const imdbId = ctx.media.imdbId; + const mediaId = ctx.media.imdbId ?? ctx.media.tmdbId; const url = ctx.media.type === 'movie' - ? `/embed/movie/${imdbId}` - : `/embed/tv/${imdbId}/${ctx.media.season.number}/${ctx.media.episode.number}`; + ? `/embed/movie/${mediaId}` + : `/embed/tv/${mediaId}/${ctx.media.season.number}/${ctx.media.episode.number}`; const mainPage = await ctx.proxiedFetcher(url, { baseUrl: vidSrcToBase, headers: {