This commit is contained in:
Himanshu
2026-02-03 21:48:37 +05:30
parent c4d3340b16
commit a179a130d6
192 changed files with 184 additions and 192 deletions

View File

@@ -1 +1 @@
var __awaiter=this&&this.__awaiter||function(thisArg,_arguments,P,generator){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){var value;result.done?resolve(result.value):(value=result.value,value instanceof P?value:new P(function(resolve){resolve(value)})).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())})};exports.getMeta=void 0;const getMeta=function(_a){return __awaiter(this,arguments,void 0,function*({link:link,providerContext:providerContext}){var _b,_c,_d,_e,_f,_g,_h;try{const{getBaseUrl:getBaseUrl,axios:axios}=providerContext,data=(yield axios.get(link)).data,meta={title:"",synopsis:"",image:"",imdbId:(null===(_b=null==data?void 0:data.meta)||void 0===_b?void 0:_b.imdb_id)||"",type:(null===(_c=null==data?void 0:data.meta)||void 0===_c?void 0:_c.type)||"movie"},baseUrl=yield getBaseUrl("ridomovies");let slug="";try{const data2=(yield axios.get(baseUrl+"/core/api/search?q="+meta.imdbId)).data;if(slug=null===(_e=null===(_d=null==data2?void 0:data2.data)||void 0===_d?void 0:_d.items[0])||void 0===_e?void 0:_e.fullSlug,!slug||"series"===(null==meta?void 0:meta.type))return{title:"",synopsis:"",image:"",imdbId:(null===(_f=null==data?void 0:data.meta)||void 0===_f?void 0:_f.imdb_id)||"",type:(null==meta?void 0:meta.type)||"movie",linkList:[]}}catch(err){return{title:"",synopsis:"",image:"",imdbId:(null==meta?void 0:meta.imdbId)||"",type:(null==meta?void 0:meta.type)||"movie",linkList:[]}}const links=[];let directLinks=[],season=new Map;if("series"===meta.type){null===(_h=null===(_g=null==data?void 0:data.meta)||void 0===_g?void 0:_g.videos)||void 0===_h||_h.map(video=>{(null==video?void 0:video.season)<=0||(season.has(null==video?void 0:video.season)||season.set(null==video?void 0:video.season,[]),season.get(null==video?void 0:video.season).push({title:"Episode "+(null==video?void 0: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 Object.assign(Object.assign({},meta),{linkList:links})}catch(err){return{title:"",synopsis:"",image:"",imdbId:"",type:"movie",linkList:[]}}})};exports.getMeta=getMeta;
"use strict";var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropNames=Object.getOwnPropertyNames,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,o)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,__spreadValues=(e,t)=>{for(var o in t||(t={}))__hasOwnProp.call(t,o)&&__defNormalProp(e,o,t[o]);if(__getOwnPropSymbols)for(var o of __getOwnPropSymbols(t))__propIsEnum.call(t,o)&&__defNormalProp(e,o,t[o]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t)),__name=(e,t)=>__defProp(e,"name",{value:t,configurable:!0}),__export=(e,t)=>{for(var o in t)__defProp(e,o,{get:t[o],enumerable:!0})},__copyProps=(e,t,o,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of __getOwnPropNames(t))__hasOwnProp.call(e,i)||i===o||__defProp(e,i,{get:()=>t[i],enumerable:!(r=__getOwnPropDesc(t,i))||r.enumerable});return e},__toCommonJS=e=>__copyProps(__defProp({},"__esModule",{value:!0}),e),__async=(e,t,o)=>new Promise((r,i)=>{var n=e=>{try{s(o.next(e))}catch(e){i(e)}},l=e=>{try{s(o.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(n,l);s((o=o.apply(e,t)).next())}),meta_exports={};__export(meta_exports,{getMeta:()=>getMeta});var getMeta=__name(function(e){return __async(this,arguments,function*({link:e,providerContext:t}){var o,r,i,n,l,s,p;try{const{getBaseUrl:a,axios:_}=t,d=(yield _.get(e)).data,u={title:"",synopsis:"",image:"",imdbId:(null==(o=null==d?void 0:d.meta)?void 0:o.imdb_id)||"",type:(null==(r=null==d?void 0:d.meta)?void 0:r.type)||"movie"},m=yield a("ridomovies");let c="";try{const e=(yield _.get(m+"/core/api/search?q="+u.imdbId)).data;if(c=null==(n=null==(i=null==e?void 0:e.data)?void 0:i.items[0])?void 0:n.fullSlug,!c||"series"===(null==u?void 0:u.type))return{title:"",synopsis:"",image:"",imdbId:(null==(l=null==d?void 0:d.meta)?void 0:l.imdb_id)||"",type:(null==u?void 0:u.type)||"movie",linkList:[]}}catch(e){return{title:"",synopsis:"",image:"",imdbId:(null==u?void 0:u.imdbId)||"",type:(null==u?void 0:u.type)||"movie",linkList:[]}}const v=[];let y=[],P=new Map;if("series"===u.type){null==(p=null==(s=null==d?void 0:d.meta)?void 0:s.videos)||p.map(e=>{(null==e?void 0:e.season)<=0||(P.has(null==e?void 0:e.season)||P.set(null==e?void 0:e.season,[]),P.get(null==e?void 0:e.season).push({title:"Episode "+(null==e?void 0:e.episode),link:""}))});for(const[e,t]of P.entries())v.push({title:"Season "+e,directLinks:t})}else y.push({title:"Movie",link:e}),v.push({title:"Movie",directLinks:y});return __spreadProps(__spreadValues({},u),{linkList:v})}catch(e){return{title:"",synopsis:"",image:"",imdbId:"",type:"movie",linkList:[]}}})},"getMeta");exports.getMeta=getMeta;