mirror of
https://github.com/movie-web/providers.git
synced 2025-09-13 12:43:25 +00:00
Add progress
This commit is contained in:
@@ -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: {
|
||||||
|
Reference in New Issue
Block a user