This commit is contained in:
himanshu8443
2025-07-11 19:45:14 +05:30
parent 13f71510d5
commit 35f1e57a0b
139 changed files with 10578 additions and 139 deletions

61
dist/kissKh/meta.js vendored
View File

@@ -1 +1,60 @@
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,i,n){return new(i||(i=Promise))(function(o,s){function l(t){try{a(n.next(t))}catch(t){s(t)}}function r(t){try{a(n.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(l,r)}a((n=n.apply(t,e||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getMeta=void 0;const getMeta=function(t){return __awaiter(this,arguments,void 0,function*({link:t,providerContext:e}){var i,n;try{const{axios:o}=e,s=(yield o.get(t)).data,l={title:s.title,synopsis:s.description,image:s.thumbnail,tags:[null===(i=null==s?void 0:s.releaseDate)||void 0===i?void 0:i.split("-")[0],null==s?void 0:s.status,null==s?void 0:s.type],imdbId:"",type:s.episodesCount>1?"series":"movie"},r=[],a=[];return null===(n=null==s?void 0:s.episodes)||void 0===n||n.reverse().map(t=>{var e;const i="Episode "+(null==t?void 0:t.number),n=null===(e=null==t?void 0:t.id)||void 0===e?void 0:e.toString();n&&i&&a.push({title:i,link:n})}),r.push({title:l.title,directLinks:a}),Object.assign(Object.assign({},l),{linkList:r})}catch(t){return{title:"",synopsis:"",image:"",imdbId:"",type:"movie",linkList:[]}}})};exports.getMeta=getMeta;
"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 = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link, providerContext, }) {
var _b, _c;
try {
const { axios } = providerContext;
const res = yield axios.get(link);
const data = res.data;
const meta = {
title: data.title,
synopsis: data.description,
image: data.thumbnail,
tags: [(_b = data === null || data === void 0 ? void 0 : data.releaseDate) === null || _b === void 0 ? void 0 : _b.split("-")[0], data === null || data === void 0 ? void 0 : data.status, data === null || data === void 0 ? void 0 : data.type],
imdbId: "",
type: data.episodesCount > 1 ? "series" : "movie",
};
const linkList = [];
const subLinks = [];
(_c = data === null || data === void 0 ? void 0 : data.episodes) === null || _c === void 0 ? void 0 : _c.reverse().map((episode) => {
var _a;
const title = "Episode " + (episode === null || episode === void 0 ? void 0 : episode.number);
const link = (_a = episode === null || episode === void 0 ? void 0 : episode.id) === null || _a === void 0 ? void 0 : _a.toString();
if (link && title) {
subLinks.push({
title,
link,
});
}
});
linkList.push({
title: meta.title,
directLinks: subLinks,
});
return Object.assign(Object.assign({}, meta), { linkList: linkList });
}
catch (err) {
console.error(err);
return {
title: "",
synopsis: "",
image: "",
imdbId: "",
type: "movie",
linkList: [],
};
}
});
};
exports.getMeta = getMeta;