From cd1c4de8e30d3f77e4b1542d3144c0cdcb9c3346 Mon Sep 17 00:00:00 2001 From: Beamlak Aschalew Date: Sun, 31 Mar 2024 11:22:50 +0300 Subject: [PATCH] Throw intentional error on showbox since the video source is not working --- package-lock.json | 9 +++++---- src/utils/functions.ts | 5 +++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6407662..3756c0e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -93,9 +93,10 @@ }, "node_modules/@movie-web/providers": { "version": "2.1.1", - "resolved": "git+ssh://git@github.com/BeamlakAschalew/mw-prod.git#aae3ce9f5328bbb1abaad6d283b7f6cb1ae7a024", + "resolved": "git+ssh://git@github.com/BeamlakAschalew/mw-prod.git#29c9a1551d47f81adc1580e94d1017e9a68a3d42", "license": "MIT", "dependencies": { + "axios": "^1.6.7", "cheerio": "^1.0.0-rc.12", "cookie": "^0.6.0", "crypto-js": "^4.1.1", @@ -247,10 +248,10 @@ } }, "node_modules/axios": { - "version": "1.6.2", + "version": "1.6.7", "license": "MIT", "dependencies": { - "follow-redirects": "^1.15.0", + "follow-redirects": "^1.15.4", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } @@ -623,7 +624,7 @@ } }, "node_modules/follow-redirects": { - "version": "1.15.3", + "version": "1.15.5", "funding": [ { "type": "individual", diff --git a/src/utils/functions.ts b/src/utils/functions.ts index 14512d8..ac8ea3a 100644 --- a/src/utils/functions.ts +++ b/src/utils/functions.ts @@ -119,6 +119,8 @@ export async function fetchMovieData(id: string): Promise<{ } | null> { const key = `tmdb-movie:${id}`; const fetchData = async () => { + console.log("Fetching mov data"); + const apiUrl = `${tmdbBaseUrl}/3/movie/${id}?language=en-US&api_key=${tmdbKey}`; try { const response = await axios.get(apiUrl); @@ -348,6 +350,9 @@ export async function fetchDash( let subSources: SubData[] = []; try { + if (provider === "showbox" || provider === "superstream") { + throw new NotFoundError(); + } const outputEmbed = await providers( proxied, reply,