Skip to content

Commit

Permalink
vidsrcto: use tmdbId when imdbId is not provided
Browse files Browse the repository at this point in the history
  • Loading branch information
lonelil committed Mar 26, 2024
1 parent 7b1a7b7 commit e381465
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/providers/sources/vidsrcto/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ const vidSrcToBase = 'https://vidsrc.to';
const referer = `${vidSrcToBase}/`;

const universalScraper = async (ctx: ShowScrapeContext | MovieScrapeContext): Promise<SourcererOutput> => {
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<string>(url, {
baseUrl: vidSrcToBase,
headers: {
Expand Down

0 comments on commit e381465

Please sign in to comment.