feat(lookmovie): add captions support

This commit is contained in:
Mahir
2023-12-31 21:26:27 +05:30
committed by GitHub
parent ac3dfb98e1
commit 67d936f58c
4 changed files with 39 additions and 15 deletions

View File

@@ -10,8 +10,8 @@ async function universalScraper(ctx: MovieScrapeContext | ShowScrapeContext): Pr
if (!lookmovieData) throw new NotFoundError('Media not found');
ctx.progress(30);
const videoUrl = await scrape(ctx, ctx.media, lookmovieData);
if (!videoUrl) throw new NotFoundError('No video found');
const video = await scrape(ctx, ctx.media, lookmovieData);
if (!video.playlist) throw new NotFoundError('No video found');
ctx.progress(60);
@@ -20,10 +20,10 @@ async function universalScraper(ctx: MovieScrapeContext | ShowScrapeContext): Pr
stream: [
{
id: 'primary',
playlist: videoUrl,
playlist: video.playlist,
type: 'hls',
flags: [flags.IP_LOCKED],
captions: [],
captions: video.captions,
},
],
};