mirror of
https://github.com/vega-org/vega-providers.git
synced 2026-04-17 15:41:45 +00:00
minify
This commit is contained in:
23
dist/kissKh/catalog.js
vendored
23
dist/kissKh/catalog.js
vendored
@@ -1,22 +1 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.genres = exports.catalog = void 0;
|
||||
exports.catalog = [
|
||||
{
|
||||
title: "Latest",
|
||||
filter: "/api/DramaList/List?type=0&sub=0&country=0&status=0&order=2",
|
||||
},
|
||||
{
|
||||
title: "Hollywood",
|
||||
filter: "/api/DramaList/List?type=4&sub=0&country=0&status=0&order=2",
|
||||
},
|
||||
{
|
||||
title: "Anime",
|
||||
filter: "/api/DramaList/List?type=3&sub=0&country=0&status=0&order=2",
|
||||
},
|
||||
{
|
||||
title: "K Drama",
|
||||
filter: "/api/DramaList/List?type=0&sub=0&country=0&status=0&order=2",
|
||||
},
|
||||
];
|
||||
exports.genres = [];
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.genres=exports.catalog=void 0,exports.catalog=[{title:"Latest",filter:"/api/DramaList/List?type=0&sub=0&country=0&status=0&order=2"},{title:"Hollywood",filter:"/api/DramaList/List?type=4&sub=0&country=0&status=0&order=2"},{title:"Anime",filter:"/api/DramaList/List?type=3&sub=0&country=0&status=0&order=2"},{title:"K Drama",filter:"/api/DramaList/List?type=0&sub=0&country=0&status=0&order=2"}],exports.genres=[];
|
||||
61
dist/kissKh/meta.js
vendored
61
dist/kissKh/meta.js
vendored
@@ -1,60 +1 @@
|
||||
"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;
|
||||
"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;
|
||||
74
dist/kissKh/posts.js
vendored
74
dist/kissKh/posts.js
vendored
@@ -1,73 +1 @@
|
||||
"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.getSearchPosts = exports.getPosts = void 0;
|
||||
const getPosts = function (_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ filter, signal, providerContext, }) {
|
||||
var _b;
|
||||
const { getBaseUrl, axios } = providerContext;
|
||||
const baseUrl = yield getBaseUrl("kissKh");
|
||||
const url = `${baseUrl + filter}&type=0`;
|
||||
try {
|
||||
const res = yield axios.get(url, { signal });
|
||||
const data = (_b = res.data) === null || _b === void 0 ? void 0 : _b.data;
|
||||
const catalog = [];
|
||||
data === null || data === void 0 ? void 0 : data.map((element) => {
|
||||
const title = element.title;
|
||||
const link = baseUrl + `/api/DramaList/Drama/${element === null || element === void 0 ? void 0 : element.id}?isq=false`;
|
||||
const image = element.thumbnail;
|
||||
if (title && link && image) {
|
||||
catalog.push({
|
||||
title: title,
|
||||
link: link,
|
||||
image: image,
|
||||
});
|
||||
}
|
||||
});
|
||||
return catalog;
|
||||
}
|
||||
catch (err) {
|
||||
console.error("kiss error ", err);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getPosts = getPosts;
|
||||
const getSearchPosts = function (_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ searchQuery, signal, providerContext, }) {
|
||||
const { getBaseUrl, axios } = providerContext;
|
||||
const baseUrl = yield getBaseUrl("kissKh");
|
||||
const url = `${baseUrl}/api/DramaList/Search?q=${searchQuery}&type=0`;
|
||||
try {
|
||||
const res = yield axios.get(url, { signal });
|
||||
const data = res.data;
|
||||
const catalog = [];
|
||||
data === null || data === void 0 ? void 0 : data.map((element) => {
|
||||
const title = element.title;
|
||||
const link = baseUrl + `/api/DramaList/Drama/${element === null || element === void 0 ? void 0 : element.id}?isq=false`;
|
||||
const image = element.thumbnail;
|
||||
if (title && link && image) {
|
||||
catalog.push({
|
||||
title: title,
|
||||
link: link,
|
||||
image: image,
|
||||
});
|
||||
}
|
||||
});
|
||||
return catalog;
|
||||
}
|
||||
catch (err) {
|
||||
console.error("kiss error ", err);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getSearchPosts = getSearchPosts;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,i,a){return new(i||(i=Promise))(function(s,n){function r(t){try{l(a.next(t))}catch(t){n(t)}}function o(t){try{l(a.throw(t))}catch(t){n(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(r,o)}l((a=a.apply(t,e||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getSearchPosts=exports.getPosts=void 0;const getPosts=function(t){return __awaiter(this,arguments,void 0,function*({filter:t,signal:e,providerContext:i}){var a;const{getBaseUrl:s,axios:n}=i,r=yield s("kissKh"),o=`${r+t}&type=0`;try{const t=null===(a=(yield n.get(o,{signal:e})).data)||void 0===a?void 0:a.data,i=[];return null==t||t.map(t=>{const e=t.title,a=r+`/api/DramaList/Drama/${null==t?void 0:t.id}?isq=false`,s=t.thumbnail;e&&a&&s&&i.push({title:e,link:a,image:s})}),i}catch(t){return[]}})};exports.getPosts=getPosts;const getSearchPosts=function(t){return __awaiter(this,arguments,void 0,function*({searchQuery:t,signal:e,providerContext:i}){const{getBaseUrl:a,axios:s}=i,n=yield a("kissKh"),r=`${n}/api/DramaList/Search?q=${t}&type=0`;try{const t=(yield s.get(r,{signal:e})).data,i=[];return null==t||t.map(t=>{const e=t.title,a=n+`/api/DramaList/Drama/${null==t?void 0:t.id}?isq=false`,s=t.thumbnail;e&&a&&s&&i.push({title:e,link:a,image:s})}),i}catch(t){return[]}})};exports.getSearchPosts=getSearchPosts;
|
||||
53
dist/kissKh/stream.js
vendored
53
dist/kissKh/stream.js
vendored
@@ -1,52 +1 @@
|
||||
"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.getStream = void 0;
|
||||
const getStream = function (_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ link: id, providerContext, }) {
|
||||
var _b, _c, _d;
|
||||
try {
|
||||
const { axios, getBaseUrl } = providerContext;
|
||||
const streamLinks = [];
|
||||
const subtitles = [];
|
||||
const baseUrl = yield getBaseUrl("kissKh");
|
||||
const streamUrl = "https://adorable-salamander-ecbb21.netlify.app/api/kisskh/video?id=" +
|
||||
id;
|
||||
const res = yield axios.get(streamUrl);
|
||||
const stream = (_c = (_b = res.data) === null || _b === void 0 ? void 0 : _b.source) === null || _c === void 0 ? void 0 : _c.Video;
|
||||
const subData = (_d = res.data) === null || _d === void 0 ? void 0 : _d.subtitles;
|
||||
subData === null || subData === void 0 ? void 0 : subData.map((sub) => {
|
||||
var _a;
|
||||
subtitles.push({
|
||||
title: sub === null || sub === void 0 ? void 0 : sub.label,
|
||||
language: sub === null || sub === void 0 ? void 0 : sub.land,
|
||||
type: ((_a = sub === null || sub === void 0 ? void 0 : sub.src) === null || _a === void 0 ? void 0 : _a.includes(".vtt")) ? "text/vtt" : "application/x-subrip",
|
||||
uri: sub === null || sub === void 0 ? void 0 : sub.src,
|
||||
});
|
||||
});
|
||||
streamLinks.push({
|
||||
server: "kissKh",
|
||||
link: stream,
|
||||
type: "m3u8",
|
||||
subtitles,
|
||||
headers: {
|
||||
referer: baseUrl,
|
||||
},
|
||||
});
|
||||
return streamLinks;
|
||||
}
|
||||
catch (err) {
|
||||
console.error(err);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getStream = getStream;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,i,n){return new(i||(i=Promise))(function(r,a){function o(t){try{s(n.next(t))}catch(t){a(t)}}function l(t){try{s(n.throw(t))}catch(t){a(t)}}function s(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(o,l)}s((n=n.apply(t,e||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getStream=void 0;const getStream=function(t){return __awaiter(this,arguments,void 0,function*({link:t,providerContext:e}){var i,n,r;try{const{axios:a,getBaseUrl:o}=e,l=[],s=[],u=yield o("kissKh"),d="https://adorable-salamander-ecbb21.netlify.app/api/kisskh/video?id="+t,v=yield a.get(d),c=null===(n=null===(i=v.data)||void 0===i?void 0:i.source)||void 0===n?void 0:n.Video,p=null===(r=v.data)||void 0===r?void 0:r.subtitles;return null==p||p.map(t=>{var e;s.push({title:null==t?void 0:t.label,language:null==t?void 0:t.land,type:(null===(e=null==t?void 0:t.src)||void 0===e?void 0:e.includes(".vtt"))?"text/vtt":"application/x-subrip",uri:null==t?void 0:t.src})}),l.push({server:"kissKh",link:c,type:"m3u8",subtitles:s,headers:{referer:u}}),l}catch(t){return[]}})};exports.getStream=getStream;
|
||||
Reference in New Issue
Block a user