fix: update getStream function to use dynamic base URL from provider context

This commit is contained in:
himanshu8443
2025-07-23 17:08:25 +05:30
parent 12f6713c22
commit e906a2d583
4 changed files with 11 additions and 6 deletions

View File

@@ -10,7 +10,8 @@ export const getStream = async ({
const { getBaseUrl } = providerContext;
try {
let providerValue = "netflixMirror";
const baseUrl = "https://netfree2.cc";
const baseUrl = await getBaseUrl("nfMirror");
console.log("nfGetStream, baseUrl:", baseUrl);
const url = `https://netmirror.8man.dev/api/net-proxy?url=${baseUrl}${
providerValue === "netflixMirror"
? "/mobile/playlist.php?id="
@@ -26,7 +27,9 @@ export const getStream = async ({
data?.sources.forEach((source: any) => {
streamLinks.push({
server: source.label,
link: source.file?.replace(":su", ":ni"),
link: source.file?.startsWith("http")
? source.file
: `${baseUrl}${source.file}`,
type: "m3u8",
headers: {
Referer: baseUrl,

View File

@@ -10,7 +10,7 @@ export const getStream = async ({
const { getBaseUrl } = providerContext;
try {
let providerValue = "primeMirror";
const baseUrl = "https://netfree2.cc";
const baseUrl = await getBaseUrl("nfMirror");
const url = `https://netmirror.8man.dev/api/net-proxy?url=${baseUrl}${
providerValue === "netflixMirror"
? "/mobile/playlist.php?id="
@@ -26,7 +26,9 @@ export const getStream = async ({
data?.sources.forEach((source: any) => {
streamLinks.push({
server: source.label,
link: (baseUrl + source.file)?.replace(":su", ":ni"),
link: source.file?.startsWith("http")
? source.file
: `${baseUrl}${source.file}`,
type: "m3u8",
headers: {
Referer: baseUrl,