This commit is contained in:
himanshu8443
2025-06-18 11:42:29 +05:30
parent 490a4bd71d
commit 9621597865
100 changed files with 6898 additions and 5740 deletions

View File

@@ -1,57 +1,66 @@
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getMeta = void 0;
const getMeta = async function ({ link, }) {
let providerValue = "primeMirror";
try {
const isPrime = providerValue === "primeMirror" ? "isPrime=true" : "isPrime=false";
const url = `https://netmirror.8man.me/api/net-proxy?${isPrime}&url=${encodeURIComponent(link)}`;
console.log("nfifo", url);
const res = await fetch(url, {
credentials: "omit",
});
const data = await res.json();
const id = link.split("id=")[1]?.split("&")[0];
const meta = {
title: data.title,
synopsis: data.desc,
image: `https://img.nfmirrorcdn.top/poster/h/${id}.jpg`,
cast: data?.short_cast?.split(","),
tags: [data?.year, data?.hdsd, ...data?.thismovieis?.split(",")],
imdbId: "",
type: "series",
};
console.log("nfinfo", meta);
const linkList = [];
if (data?.season?.length > 0) {
data.season.map((season) => {
linkList.push({
title: "Season " + season?.s,
episodesLink: season?.id,
const getMeta = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link, }) {
var _b, _c, _d, _e;
let providerValue = "primeMirror";
try {
const isPrime = providerValue === "primeMirror" ? "isPrime=true" : "isPrime=false";
const url = `https://netmirror.8man.me/api/net-proxy?${isPrime}&url=${encodeURIComponent(link)}`;
console.log("nfifo", url);
const res = yield fetch(url, {
credentials: "omit",
});
const data = yield res.json();
const id = (_b = link.split("id=")[1]) === null || _b === void 0 ? void 0 : _b.split("&")[0];
const meta = {
title: data.title,
synopsis: data.desc,
image: `https://img.nfmirrorcdn.top/poster/h/${id}.jpg`,
cast: (_c = data === null || data === void 0 ? void 0 : data.short_cast) === null || _c === void 0 ? void 0 : _c.split(","),
tags: [data === null || data === void 0 ? void 0 : data.year, data === null || data === void 0 ? void 0 : data.hdsd, ...(_d = data === null || data === void 0 ? void 0 : data.thismovieis) === null || _d === void 0 ? void 0 : _d.split(",")],
imdbId: "",
type: "series",
};
console.log("nfinfo", meta);
const linkList = [];
if (((_e = data === null || data === void 0 ? void 0 : data.season) === null || _e === void 0 ? void 0 : _e.length) > 0) {
data.season.map((season) => {
linkList.push({
title: "Season " + (season === null || season === void 0 ? void 0 : season.s),
episodesLink: season === null || season === void 0 ? void 0 : season.id,
});
});
});
}
else {
linkList.push({
title: meta.title,
directLinks: [{ link: id, title: "Movie", type: "movie" }],
});
}
return Object.assign(Object.assign({}, meta), { linkList: linkList });
}
else {
linkList.push({
title: meta.title,
directLinks: [{ link: id, title: "Movie", type: "movie" }],
});
catch (err) {
console.error(err);
return {
title: "",
synopsis: "",
image: "",
imdbId: "",
type: "",
linkList: [],
};
}
return {
...meta,
linkList: linkList,
};
}
catch (err) {
console.error(err);
return {
title: "",
synopsis: "",
image: "",
imdbId: "",
type: "",
linkList: [],
};
}
});
};
exports.getMeta = getMeta;