From 8bc0a6061dcd0ecf91ad322065b4139e2205f2ed Mon Sep 17 00:00:00 2001 From: himanshu8443 Date: Tue, 12 Nov 2024 14:44:22 +0530 Subject: [PATCH 1/3] Enhance allGetStream function: add server 4 and server 5 support, implement axios for server 5 requests, and improve error handling --- src/lib/providers/autoEmbed/allGetStream.ts | 77 +++++++++++++++++---- 1 file changed, 63 insertions(+), 14 deletions(-) diff --git a/src/lib/providers/autoEmbed/allGetStream.ts b/src/lib/providers/autoEmbed/allGetStream.ts index 2d31bea..1d42263 100644 --- a/src/lib/providers/autoEmbed/allGetStream.ts +++ b/src/lib/providers/autoEmbed/allGetStream.ts @@ -6,6 +6,7 @@ import {stableExtractor} from './stableExtractor'; import {getFlimxyStream} from './getFlimxyStream'; import {getRiveStream} from './getRiveStream'; import {getVidSrcRip} from './getVidSrcRip'; +import axios from 'axios'; const autoembed = 'YXV0b2VtYmVkLmNj'; export const allGetStream = async ( @@ -184,20 +185,20 @@ export const allGetStream = async ( ///// autoembed // server1 - const server1Url = - type === 'movie' - ? `https://${atob(autoembed)}/embed/oplayer.php?id=${imdbId}` - : `https://${atob( - autoembed, - )}/embed/oplayer.php?id=${imdbId}&s=${season}&e=${episode}`; - const links = await multiExtractor(server1Url); - links.forEach(({lang, url}) => { - streams.push({ - server: 'Multi' + (lang ? `-${lang}` : ''), - link: url, - type: 'm3u8', - }); - }); + // const server1Url = + // type === 'movie' + // ? `https://${atob(autoembed)}/embed/oplayer.php?id=${imdbId}` + // : `https://${atob( + // autoembed, + // )}/embed/oplayer.php?id=${imdbId}&s=${season}&e=${episode}`; + // const links = await multiExtractor(server1Url); + // links.forEach(({lang, url}) => { + // streams.push({ + // server: 'Multi' + (lang ? `-${lang}` : ''), + // link: url, + // type: 'm3u8', + // }); + // }); // server 2 @@ -214,6 +215,24 @@ export const allGetStream = async ( // }); // }); + // server 4 + + const server4Url = + type === 'movie' + ? `https://${atob(autoembed)}/embed/player.php?id=${tmdbId}` + : `https://${atob( + autoembed, + )}/embed/player.php?id=${tmdbId}&s=${season}&e=${episode}`; + console.log(server4Url); + const links4 = await multiExtractor(server4Url); + links4.forEach(({lang, url}) => { + streams.push({ + server: 'Stable ' + (lang ? `-${lang}` : ''), + link: url, + type: 'm3u8', + }); + }); + // server 3 const server3Url = @@ -229,6 +248,36 @@ export const allGetStream = async ( }); }); + // server 5 + + const server5Url = + type === 'movie' + ? `https://tom.${atob( + autoembed, + )}/api/getVideoSource?type=movie&id=${tmdbId}` + : `https://tom.${atob( + autoembed, + )}/api/getVideoSource?type=tv&id=${tmdbId}/${season}/${episode}`; + try { + const links5Res = await axios(server5Url, { + timeout: 20000, + headers: { + 'user-agent': + 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0', + Referer: `https://${atob(autoembed)}/`, + }, + }); + const links5 = links5Res.data; + if (links5.videoSource) { + streams.push({ + server: 'Tom', + link: links5.videoSource, + type: 'm3u8', + }); + } + } catch (err) { + console.error('Tom', err); + } return streams; } catch (err) { console.error(err); From a1ce73d373db5a05642a4c02fe5791652a7a81ae Mon Sep 17 00:00:00 2001 From: himanshu8443 Date: Tue, 12 Nov 2024 14:44:31 +0530 Subject: [PATCH 2/3] Bump version to 2.5.3: update versionCode and versionName in build.gradle, app.json, package.json, and package-lock.json --- android/app/build.gradle | 4 ++-- app.json | 4 ++-- package-lock.json | 2 +- package.json | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 0437f54..6d20269 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -86,8 +86,8 @@ android { applicationId "com.vega" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 74 - versionName "2.5.2" + versionCode 76 + versionName "2.5.3" } signingConfigs { release { diff --git a/app.json b/app.json index e941c27..25d8914 100644 --- a/app.json +++ b/app.json @@ -21,12 +21,12 @@ ] ], "slug": "vega", - "version": "2.5.2", + "version": "2.5.3", "sdkVersion": "51.0.0", "android": { "minSdkVersion": 24, "package": "com.vega", - "versionCode": 74 + "versionCode": 76 }, "platforms": ["ios", "android"] } diff --git a/package-lock.json b/package-lock.json index 5ee6da2..70d59b4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "vega", - "version": "2.5.0", + "version": "2.5.3", "lockfileVersion": 3, "requires": true, "packages": { diff --git a/package.json b/package.json index b955c32..250b7da 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vega", - "version": "2.5.2", + "version": "2.5.3", "private": true, "scripts": { "android": "react-native run-android", From cb59c84c2391333881dbfd8569366b76f0da3548 Mon Sep 17 00:00:00 2001 From: himanshu8443 Date: Tue, 12 Nov 2024 14:57:47 +0530 Subject: [PATCH 3/3] Refactor allGetStream function: uncomment server 1 URL handling and link extraction logic --- src/lib/providers/autoEmbed/allGetStream.ts | 28 ++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/lib/providers/autoEmbed/allGetStream.ts b/src/lib/providers/autoEmbed/allGetStream.ts index 1d42263..e8a245e 100644 --- a/src/lib/providers/autoEmbed/allGetStream.ts +++ b/src/lib/providers/autoEmbed/allGetStream.ts @@ -185,20 +185,20 @@ export const allGetStream = async ( ///// autoembed // server1 - // const server1Url = - // type === 'movie' - // ? `https://${atob(autoembed)}/embed/oplayer.php?id=${imdbId}` - // : `https://${atob( - // autoembed, - // )}/embed/oplayer.php?id=${imdbId}&s=${season}&e=${episode}`; - // const links = await multiExtractor(server1Url); - // links.forEach(({lang, url}) => { - // streams.push({ - // server: 'Multi' + (lang ? `-${lang}` : ''), - // link: url, - // type: 'm3u8', - // }); - // }); + const server1Url = + type === 'movie' + ? `https://${atob(autoembed)}/embed/oplayer.php?id=${imdbId}` + : `https://${atob( + autoembed, + )}/embed/oplayer.php?id=${imdbId}&s=${season}&e=${episode}`; + const links = await multiExtractor(server1Url); + links.forEach(({lang, url}) => { + streams.push({ + server: 'Multi' + (lang ? `-${lang}` : ''), + link: url, + type: 'm3u8', + }); + }); // server 2