This commit is contained in:
himanshu8443
2025-06-17 21:32:50 +05:30
parent 1b23125dfd
commit a2afb200ad
264 changed files with 0 additions and 16201 deletions

View File

@@ -1,85 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getMeta = void 0;
const getMeta = async function ({ link, providerContext, }) {
try {
const { getBaseUrl, axios } = providerContext;
const res = await axios.get(link);
const data = res.data;
const meta = {
title: "",
synopsis: "",
image: "",
imdbId: data?.meta?.imdb_id || "",
type: data?.meta?.type || "movie",
};
const baseUrl = await getBaseUrl("ridomovies");
let slug = "";
try {
const res2 = await axios.get(baseUrl + "/core/api/search?q=" + meta.imdbId);
const data2 = res2.data;
slug = data2?.data?.items[0]?.fullSlug;
if (!slug || meta?.type === "series") {
return {
title: "",
synopsis: "",
image: "",
imdbId: data?.meta?.imdb_id || "",
type: meta?.type || "movie",
linkList: [],
};
}
}
catch (err) {
return {
title: "",
synopsis: "",
image: "",
imdbId: meta?.imdbId || "",
type: meta?.type || "movie",
linkList: [],
};
}
const links = [];
let directLinks = [];
let season = new Map();
if (meta.type === "series") {
data?.meta?.videos?.map((video) => {
if (video?.season <= 0)
return;
if (!season.has(video?.season)) {
season.set(video?.season, []);
}
season.get(video?.season).push({
title: "Episode " + video?.episode,
link: "",
});
});
for (const [seasonNum, episodes] of season.entries()) {
links.push({
title: "Season " + seasonNum,
directLinks: episodes,
});
}
}
else {
directLinks.push({ title: "Movie", link: link });
links.push({ title: "Movie", directLinks: directLinks });
}
return {
...meta,
linkList: links,
};
}
catch (err) {
return {
title: "",
synopsis: "",
image: "",
imdbId: "",
type: "movie",
linkList: [],
};
}
};
exports.getMeta = getMeta;