mirror of
https://github.com/vega-org/vega-providers.git
synced 2026-04-17 23:51:44 +00:00
minify
This commit is contained in:
23
dist/hiAnime/catalog.js
vendored
23
dist/hiAnime/catalog.js
vendored
@@ -1,22 +1 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.genres = exports.catalog = void 0;
|
||||
exports.catalog = [
|
||||
{
|
||||
title: "Recent",
|
||||
filter: "/anime/zoro/recent-episodes",
|
||||
},
|
||||
{
|
||||
title: "Top Airing",
|
||||
filter: "/anime/zoro/top-airing",
|
||||
},
|
||||
{
|
||||
title: "Most Popular",
|
||||
filter: "/anime/zoro/most-popular",
|
||||
},
|
||||
{
|
||||
title: "Most Favorited",
|
||||
filter: "/anime/zoro/most-favorite",
|
||||
},
|
||||
];
|
||||
exports.genres = [];
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.genres=exports.catalog=void 0,exports.catalog=[{title:"Recent",filter:"/anime/zoro/recent-episodes"},{title:"Top Airing",filter:"/anime/zoro/top-airing"},{title:"Most Popular",filter:"/anime/zoro/most-popular"},{title:"Most Favorited",filter:"/anime/zoro/most-favorite"}],exports.genres=[];
|
||||
87
dist/hiAnime/meta.js
vendored
87
dist/hiAnime/meta.js
vendored
@@ -1,86 +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, }) {
|
||||
try {
|
||||
const { getBaseUrl, axios } = providerContext;
|
||||
const baseUrl = yield getBaseUrl("consumet");
|
||||
const url = `${baseUrl}/anime/zoro/info?id=` + link;
|
||||
const res = yield axios.get(url);
|
||||
const data = res.data;
|
||||
const meta = {
|
||||
title: data.title,
|
||||
synopsis: data.description,
|
||||
image: data.image,
|
||||
tags: [
|
||||
data === null || data === void 0 ? void 0 : data.type,
|
||||
(data === null || data === void 0 ? void 0 : data.subOrDub) === "both" ? "Sub And Dub" : data === null || data === void 0 ? void 0 : data.subOrDub,
|
||||
],
|
||||
imdbId: "",
|
||||
type: data.episodes.length > 0 ? "series" : "movie",
|
||||
};
|
||||
const linkList = [];
|
||||
const subLinks = [];
|
||||
data.episodes.forEach((episode) => {
|
||||
if (!(episode === null || episode === void 0 ? void 0 : episode.isSubbed)) {
|
||||
return;
|
||||
}
|
||||
const title = "Episode " + episode.number + ((episode === null || episode === void 0 ? void 0 : episode.isFiller) ? " (Filler)" : "");
|
||||
const link = episode.id + "$sub";
|
||||
if (link && title) {
|
||||
subLinks.push({
|
||||
title,
|
||||
link,
|
||||
});
|
||||
}
|
||||
});
|
||||
linkList.push({
|
||||
title: meta.title + " (Sub)",
|
||||
directLinks: subLinks,
|
||||
});
|
||||
if ((data === null || data === void 0 ? void 0 : data.subOrDub) === "both") {
|
||||
const dubLinks = [];
|
||||
data.episodes.forEach((episode) => {
|
||||
if (!(episode === null || episode === void 0 ? void 0 : episode.isDubbed)) {
|
||||
return;
|
||||
}
|
||||
const title = "Episode " + episode.number + ((episode === null || episode === void 0 ? void 0 : episode.isFiller) ? " (Filler)" : "");
|
||||
const link = episode.id + "$dub";
|
||||
if (link && title) {
|
||||
dubLinks.push({
|
||||
title,
|
||||
link,
|
||||
});
|
||||
}
|
||||
});
|
||||
linkList.push({
|
||||
title: meta.title + " (Dub)",
|
||||
directLinks: dubLinks,
|
||||
});
|
||||
}
|
||||
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(s,o){function u(t){try{r(n.next(t))}catch(t){o(t)}}function l(t){try{r(n.throw(t))}catch(t){o(t)}}function r(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(u,l)}r((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{getBaseUrl:i,axios:n}=e,s=`${yield i("consumet")}/anime/zoro/info?id=`+t,o=(yield n.get(s)).data,u={title:o.title,synopsis:o.description,image:o.image,tags:[null==o?void 0:o.type,"both"===(null==o?void 0:o.subOrDub)?"Sub And Dub":null==o?void 0:o.subOrDub],imdbId:"",type:o.episodes.length>0?"series":"movie"},l=[],r=[];if(o.episodes.forEach(t=>{if(!(null==t?void 0:t.isSubbed))return;const e="Episode "+t.number+((null==t?void 0:t.isFiller)?" (Filler)":""),i=t.id+"$sub";i&&e&&r.push({title:e,link:i})}),l.push({title:u.title+" (Sub)",directLinks:r}),"both"===(null==o?void 0:o.subOrDub)){const t=[];o.episodes.forEach(e=>{if(!(null==e?void 0:e.isDubbed))return;const i="Episode "+e.number+((null==e?void 0:e.isFiller)?" (Filler)":""),n=e.id+"$dub";n&&i&&t.push({title:i,link:n})}),l.push({title:u.title+" (Dub)",directLinks:t})}return Object.assign(Object.assign({},u),{linkList:l})}catch(t){return{title:"",synopsis:"",image:"",imdbId:"",type:"movie",linkList:[]}}})};exports.getMeta=getMeta;
|
||||
58
dist/hiAnime/posts.js
vendored
58
dist/hiAnime/posts.js
vendored
@@ -1,57 +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, page, signal, providerContext, }) {
|
||||
const { getBaseUrl, axios } = providerContext;
|
||||
const baseUrl = yield getBaseUrl("consumet");
|
||||
const url = `${baseUrl + filter}?page=${page}`;
|
||||
return posts({ url, signal, axios });
|
||||
});
|
||||
};
|
||||
exports.getPosts = getPosts;
|
||||
const getSearchPosts = function (_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ searchQuery, page, signal, providerContext, }) {
|
||||
const { getBaseUrl, axios } = providerContext;
|
||||
const baseUrl = yield getBaseUrl("consumet");
|
||||
const url = `${baseUrl}/anime/zoro/${searchQuery}?page=${page}`;
|
||||
return posts({ url, signal, axios });
|
||||
});
|
||||
};
|
||||
exports.getSearchPosts = getSearchPosts;
|
||||
function posts(_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ url, signal, axios, }) {
|
||||
var _b;
|
||||
try {
|
||||
const res = yield axios.get(url, { signal });
|
||||
const data = (_b = res.data) === null || _b === void 0 ? void 0 : _b.results;
|
||||
const catalog = [];
|
||||
data === null || data === void 0 ? void 0 : data.map((element) => {
|
||||
const title = element.title;
|
||||
const link = element.id;
|
||||
const image = element.image;
|
||||
if (title && link && image) {
|
||||
catalog.push({
|
||||
title: title,
|
||||
link: link,
|
||||
image: image,
|
||||
});
|
||||
}
|
||||
});
|
||||
return catalog;
|
||||
}
|
||||
catch (err) {
|
||||
console.error("zoro error ", err);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
}
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,s,n){return new(s||(s=Promise))(function(o,i){function r(t){try{u(n.next(t))}catch(t){i(t)}}function a(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof s?e:new s(function(t){t(e)})).then(r,a)}u((n=n.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,page:e,signal:s,providerContext:n}){const{getBaseUrl:o,axios:i}=n;return posts({url:`${(yield o("consumet"))+t}?page=${e}`,signal:s,axios:i})})};exports.getPosts=getPosts;const getSearchPosts=function(t){return __awaiter(this,arguments,void 0,function*({searchQuery:t,page:e,signal:s,providerContext:n}){const{getBaseUrl:o,axios:i}=n;return posts({url:`${yield o("consumet")}/anime/zoro/${t}?page=${e}`,signal:s,axios:i})})};function posts(t){return __awaiter(this,arguments,void 0,function*({url:t,signal:e,axios:s}){var n;try{const o=null===(n=(yield s.get(t,{signal:e})).data)||void 0===n?void 0:n.results,i=[];return null==o||o.map(t=>{const e=t.title,s=t.id,n=t.image;e&&s&&n&&i.push({title:e,link:s,image:n})}),i}catch(t){return[]}})}exports.getSearchPosts=getSearchPosts;
|
||||
67
dist/hiAnime/stream.js
vendored
67
dist/hiAnime/stream.js
vendored
@@ -1,66 +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, }) {
|
||||
try {
|
||||
const { getBaseUrl, axios } = providerContext;
|
||||
const baseUrl = yield getBaseUrl("consumet");
|
||||
const servers = ["vidcloud", "vidstreaming"];
|
||||
const url = `${baseUrl}/anime/zoro/watch?episodeId=${id}&server=`;
|
||||
const streamLinks = [];
|
||||
yield Promise.all(servers.map((server) => __awaiter(this, void 0, void 0, function* () {
|
||||
var _a, _b;
|
||||
try {
|
||||
const res = yield axios.get(url + server);
|
||||
if (res.data) {
|
||||
const subtitles = [];
|
||||
(_a = res.data) === null || _a === void 0 ? void 0 : _a.subtitles.forEach((sub) => {
|
||||
var _a, _b;
|
||||
if ((sub === null || sub === void 0 ? void 0 : sub.lang) === "Thumbnails")
|
||||
return;
|
||||
subtitles.push({
|
||||
language: ((_a = sub === null || sub === void 0 ? void 0 : sub.lang) === null || _a === void 0 ? void 0 : _a.slice(0, 2)) || "Und",
|
||||
uri: sub === null || sub === void 0 ? void 0 : sub.url,
|
||||
title: (sub === null || sub === void 0 ? void 0 : sub.lang) || "Undefined",
|
||||
type: ((_b = sub === null || sub === void 0 ? void 0 : sub.url) === null || _b === void 0 ? void 0 : _b.endsWith(".vtt"))
|
||||
? "text/vtt"
|
||||
: "application/x-subrip",
|
||||
});
|
||||
});
|
||||
(_b = res.data) === null || _b === void 0 ? void 0 : _b.sources.forEach((source) => {
|
||||
streamLinks.push({
|
||||
server: server,
|
||||
link: source === null || source === void 0 ? void 0 : source.url,
|
||||
type: (source === null || source === void 0 ? void 0 : source.isM3U8) ? "m3u8" : "mp4",
|
||||
headers: {
|
||||
Referer: "https://megacloud.club/",
|
||||
Origin: "https://megacloud.club",
|
||||
},
|
||||
subtitles: subtitles,
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
})));
|
||||
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(o,r){function l(t){try{u(n.next(t))}catch(t){r(t)}}function a(t){try{u(n.throw(t))}catch(t){r(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(l,a)}u((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}){try{const{getBaseUrl:i,axios:n}=e,o=yield i("consumet"),r=["vidcloud","vidstreaming"],l=`${o}/anime/zoro/watch?episodeId=${t}&server=`,a=[];return yield Promise.all(r.map(t=>__awaiter(this,void 0,void 0,function*(){var e,i;try{const o=yield n.get(l+t);if(o.data){const n=[];null===(e=o.data)||void 0===e||e.subtitles.forEach(t=>{var e,i;"Thumbnails"!==(null==t?void 0:t.lang)&&n.push({language:(null===(e=null==t?void 0:t.lang)||void 0===e?void 0:e.slice(0,2))||"Und",uri:null==t?void 0:t.url,title:(null==t?void 0:t.lang)||"Undefined",type:(null===(i=null==t?void 0:t.url)||void 0===i?void 0:i.endsWith(".vtt"))?"text/vtt":"application/x-subrip"})}),null===(i=o.data)||void 0===i||i.sources.forEach(e=>{a.push({server:t,link:null==e?void 0:e.url,type:(null==e?void 0:e.isM3U8)?"m3u8":"mp4",headers:{Referer:"https://megacloud.club/",Origin:"https://megacloud.club"},subtitles:n})})}}catch(t){}}))),a}catch(t){return[]}})};exports.getStream=getStream;
|
||||
Reference in New Issue
Block a user