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

65
dist/flixhq/meta.js vendored
View File

@@ -1 +1,64 @@
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,i,n){return new(i||(i=Promise))(function(s,o){function a(t){try{l(n.next(t))}catch(t){o(t)}}function r(t){try{l(n.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(a,r)}l((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}){try{const{axios:i,getBaseUrl:n}=e,s=`${yield n("consumet")}/movies/flixhq/info?id=`+t,o=(yield i.get(s)).data,a={title:o.title,synopsis:o.description.replace(/<[^>]*>?/gm,"").trim(),image:o.cover,cast:o.casts,rating:o.rating,tags:[null==o?void 0:o.type,null==o?void 0:o.duration,o.releaseDate.split("-")[0]],imdbId:"",type:o.episodes.length>1?"series":"movie"},r=[];return o.episodes.forEach(t=>{const e=(null==t?void 0:t.number)?"Season-"+(null==t?void 0:t.season)+" Ep-"+t.number:t.title,i=t.id+"*"+o.id;i&&e&&r.push({title:e,link:i})}),Object.assign(Object.assign({},a),{linkList:[{title:a.title,directLinks: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: id, providerContext, }) {
try {
const { axios, getBaseUrl } = providerContext;
const baseUrl = yield getBaseUrl("consumet");
const url = `${baseUrl}/movies/flixhq/info?id=` + id;
const res = yield axios.get(url);
const data = res.data;
const meta = {
title: data.title,
synopsis: data.description.replace(/<[^>]*>?/gm, "").trim(),
image: data.cover,
cast: data.casts,
rating: data.rating,
tags: [data === null || data === void 0 ? void 0 : data.type, data === null || data === void 0 ? void 0 : data.duration, data.releaseDate.split("-")[0]],
imdbId: "",
type: data.episodes.length > 1 ? "series" : "movie",
};
const links = [];
data.episodes.forEach((episode) => {
const title = (episode === null || episode === void 0 ? void 0 : episode.number)
? "Season-" + (episode === null || episode === void 0 ? void 0 : episode.season) + " Ep-" + episode.number
: episode.title;
const link = episode.id + "*" + data.id;
if (link && title) {
links.push({
title,
link,
});
}
});
return Object.assign(Object.assign({}, meta), { linkList: [
{
title: meta.title,
directLinks: links,
},
] });
}
catch (err) {
console.error(err);
return {
title: "",
synopsis: "",
image: "",
imdbId: "",
type: "movie",
linkList: [],
};
}
});
};
exports.getMeta = getMeta;