This commit is contained in:
himanshu8443
2025-06-16 22:35:39 +05:30
parent 4c95efcb5b
commit a21dad9698
123 changed files with 8099 additions and 159 deletions

85
dist/ringz/meta.js vendored Normal file
View File

@@ -0,0 +1,85 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getMeta = void 0;
const getMeta = async function ({ link: data, }) {
try {
const dataJson = JSON.parse(data);
const title = dataJson?.kn || dataJson?.mn;
const image = dataJson?.IH || dataJson?.IV;
const tags = dataJson?.gn
.split(",")
.slice(0, 3)
.map((tag) => tag.trim());
const type = dataJson?.cg === "webSeries" ? "series" : "movie";
const linkList = [];
if (dataJson?.cg === "webSeries") {
["1", "2", "3", "4"]?.forEach((item) => {
const directLinks = [];
if (typeof dataJson?.["eServer" + item] === "object" &&
Object?.keys(dataJson?.["eServer" + item])?.length > 0) {
Object.keys(dataJson?.["eServer" + item]).forEach((key) => {
directLinks.push({
title: "Episode " + key,
link: JSON.stringify({
url: dataJson?.["eServer" + item][key],
server: "Server " + item,
}),
});
});
linkList.push({
title: dataJson?.pn + " (Server " + item + ")",
directLinks,
});
}
});
}
else {
const directLinks = [];
["1", "2", "3", "4"]?.forEach((item) => {
if (dataJson?.["s" + item]) {
directLinks.push({
title: "Server " + item + " (HD)",
link: JSON.stringify({
url: dataJson?.s1,
server: "Server " + item,
}),
});
}
if (dataJson?.["4s" + item]) {
directLinks.push({
title: "Server " + item + " (480p)",
link: JSON.stringify({
url: dataJson?.["4s" + item],
server: "Server " + item,
}),
});
}
});
linkList.push({
title: dataJson?.pn,
directLinks,
});
}
return {
title,
image,
imdbId: "",
synopsis: "",
type,
linkList,
tags,
};
}
catch (err) {
return {
title: "",
image: "",
imdbId: "",
synopsis: "",
type: "movie",
linkList: [],
tags: [],
};
}
};
exports.getMeta = getMeta;