Add progress

This commit is contained in:
Jip Fr
2023-10-01 22:16:46 +02:00
parent bbc4f60c73
commit 19f03949f4

View File

@@ -8,9 +8,13 @@ async function universalScraper(ctx: ShowContext | MovieContext): Promise<Source
const lookmovieData = await searchAndFindMedia(ctx.media); const lookmovieData = await searchAndFindMedia(ctx.media);
if (!lookmovieData) throw new NotFoundError('Media not found'); if (!lookmovieData) throw new NotFoundError('Media not found');
ctx.progress(30);
const videoUrl = await scrape(ctx.media, lookmovieData); const videoUrl = await scrape(ctx.media, lookmovieData);
if (!videoUrl) throw new NotFoundError('No video found'); if (!videoUrl) throw new NotFoundError('No video found');
ctx.progress(60);
return { return {
embeds: [], embeds: [],
stream: { stream: {