fix: simplify link construction in getStream function

This commit is contained in:
himanshu8443
2025-07-04 22:46:54 +05:30
parent 7c760b323e
commit 2a22eddcea
2 changed files with 2 additions and 2 deletions

View File

@@ -29,7 +29,7 @@ const getStream = (_a) => __awaiter(void 0, [_a], void 0, function* ({ link: id,
var _a; var _a;
streamLinks.push({ streamLinks.push({
server: source.label, server: source.label,
link: (_a = (baseUrl + source.file)) === null || _a === void 0 ? void 0 : _a.replace(":su", ":ni"), link: (_a = source.file) === null || _a === void 0 ? void 0 : _a.replace(":su", ":ni"),
type: "m3u8", type: "m3u8",
headers: { headers: {
Referer: baseUrl, Referer: baseUrl,

View File

@@ -26,7 +26,7 @@ export const getStream = async ({
data?.sources.forEach((source: any) => { data?.sources.forEach((source: any) => {
streamLinks.push({ streamLinks.push({
server: source.label, server: source.label,
link: (baseUrl + source.file)?.replace(":su", ":ni"), link: source.file?.replace(":su", ":ni"),
type: "m3u8", type: "m3u8",
headers: { headers: {
Referer: baseUrl, Referer: baseUrl,