This commit is contained in:
himanshu8443
2025-06-17 21:32:50 +05:30
parent 1b23125dfd
commit a2afb200ad
264 changed files with 0 additions and 16201 deletions

View File

@@ -1,54 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.hiGetStream = void 0;
const types_1 = require("../types");
const hiGetStream = async function ({ link: id, providerContext, }) {
try {
const { getBaseUrl, axios } = providerContext;
const baseUrl = await getBaseUrl('consumet');
const servers = ['vidcloud', 'vidstreaming'];
const url = `${baseUrl}/anime/zoro/watch?episodeId=${id}&server=`;
const streamLinks = [];
await Promise.all(servers.map(async (server) => {
try {
const res = await axios.get(url + server);
if (res.data) {
const subtitles = [];
res.data?.subtitles.forEach((sub) => {
if (sub?.lang === 'Thumbnails')
return;
subtitles.push({
language: sub?.lang?.slice(0, 2) || 'Und',
uri: sub?.url,
title: sub?.lang || 'Undefined',
type: sub?.url?.endsWith('.vtt')
? types_1.TextTrackType.VTT
: types_1.TextTrackType.SUBRIP,
});
});
res.data?.sources.forEach((source) => {
streamLinks.push({
server: server,
link: source?.url,
type: 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.hiGetStream = hiGetStream;

View File

@@ -1,22 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.genres = exports.catalogs = void 0;
exports.catalogs = [
{
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 = [];

View File

@@ -1,22 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.hiGenresList = exports.hiCatalog = void 0;
exports.hiCatalog = [
{
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.hiGenresList = [];

View File

@@ -1,78 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.hiGetInfo = void 0;
const hiGetInfo = async function ({ link, providerContext, }) {
try {
const { getBaseUrl, axios } = providerContext;
const baseUrl = await getBaseUrl('consumet');
const url = `${baseUrl}/anime/zoro/info?id=` + link;
const res = await axios.get(url);
const data = res.data;
const meta = {
title: data.title,
synopsis: data.description,
image: data.image,
tags: [
data?.type,
data?.subOrDub === 'both' ? 'Sub And Dub' : data?.subOrDub,
],
imdbId: '',
type: data.episodes.length > 0 ? 'series' : 'movie',
};
const linkList = [];
const subLinks = [];
data.episodes.forEach((episode) => {
if (!episode?.isSubbed) {
return;
}
const title = 'Episode ' + episode.number + (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?.subOrDub === 'both') {
const dubLinks = [];
data.episodes.forEach((episode) => {
if (!episode?.isDubbed) {
return;
}
const title = 'Episode ' + episode.number + (episode?.isFiller ? ' (Filler)' : '');
const link = episode.id + '$dub';
if (link && title) {
dubLinks.push({
title,
link,
});
}
});
linkList.push({
title: meta.title + ' (Dub)',
directLinks: dubLinks,
});
}
return {
...meta,
linkList: linkList,
};
}
catch (err) {
console.error(err);
return {
title: '',
synopsis: '',
image: '',
imdbId: '',
type: 'movie',
linkList: [],
};
}
};
exports.hiGetInfo = hiGetInfo;

View File

@@ -1,41 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.hiGetPostsSearch = exports.hiGetPosts = void 0;
const hiGetPosts = async function ({ filter, page, signal, providerContext, }) {
const { getBaseUrl, axios } = providerContext;
const baseUrl = await getBaseUrl('consumet');
const url = `${baseUrl + filter}?page=${page}`;
return posts({ url, signal, axios });
};
exports.hiGetPosts = hiGetPosts;
const hiGetPostsSearch = async function ({ searchQuery, page, signal, providerContext, }) {
const { getBaseUrl, axios } = providerContext;
const baseUrl = await getBaseUrl('consumet');
const url = `${baseUrl}/anime/zoro/${searchQuery}?page=${page}`;
return posts({ url, signal, axios });
};
exports.hiGetPostsSearch = hiGetPostsSearch;
async function posts({ url, signal, axios, }) {
try {
const res = await axios.get(url, { signal });
const data = res.data?.results;
const catalog = [];
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 [];
}
}

15
dist/hiAnime/index.js vendored
View File

@@ -1,15 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.HiAnime = void 0;
const hiGetInfo_1 = require("./hiGetInfo");
const hiCatalog_1 = require("./hiCatalog");
const HiGetSteam_1 = require("./HiGetSteam");
const hiGetPosts_1 = require("./hiGetPosts");
exports.HiAnime = {
catalog: hiCatalog_1.hiCatalog,
genres: hiCatalog_1.hiGenresList,
GetMetaData: hiGetInfo_1.hiGetInfo,
GetHomePosts: hiGetPosts_1.hiGetPosts,
GetStream: HiGetSteam_1.hiGetStream,
GetSearchPosts: hiGetPosts_1.hiGetPostsSearch,
};

78
dist/hiAnime/meta.js vendored
View File

@@ -1,78 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getMeta = void 0;
const getMeta = async function ({ link, providerContext, }) {
try {
const { getBaseUrl, axios } = providerContext;
const baseUrl = await getBaseUrl("consumet");
const url = `${baseUrl}/anime/zoro/info?id=` + link;
const res = await axios.get(url);
const data = res.data;
const meta = {
title: data.title,
synopsis: data.description,
image: data.image,
tags: [
data?.type,
data?.subOrDub === "both" ? "Sub And Dub" : data?.subOrDub,
],
imdbId: "",
type: data.episodes.length > 0 ? "series" : "movie",
};
const linkList = [];
const subLinks = [];
data.episodes.forEach((episode) => {
if (!episode?.isSubbed) {
return;
}
const title = "Episode " + episode.number + (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?.subOrDub === "both") {
const dubLinks = [];
data.episodes.forEach((episode) => {
if (!episode?.isDubbed) {
return;
}
const title = "Episode " + episode.number + (episode?.isFiller ? " (Filler)" : "");
const link = episode.id + "$dub";
if (link && title) {
dubLinks.push({
title,
link,
});
}
});
linkList.push({
title: meta.title + " (Dub)",
directLinks: dubLinks,
});
}
return {
...meta,
linkList: linkList,
};
}
catch (err) {
console.error(err);
return {
title: "",
synopsis: "",
image: "",
imdbId: "",
type: "movie",
linkList: [],
};
}
};
exports.getMeta = getMeta;

41
dist/hiAnime/posts.js vendored
View File

@@ -1,41 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getSearchPosts = exports.getPosts = void 0;
const getPosts = async function ({ filter, page, signal, providerContext, }) {
const { getBaseUrl, axios } = providerContext;
const baseUrl = await getBaseUrl("consumet");
const url = `${baseUrl + filter}?page=${page}`;
return posts({ url, signal, axios });
};
exports.getPosts = getPosts;
const getSearchPosts = async function ({ searchQuery, page, signal, providerContext, }) {
const { getBaseUrl, axios } = providerContext;
const baseUrl = await getBaseUrl("consumet");
const url = `${baseUrl}/anime/zoro/${searchQuery}?page=${page}`;
return posts({ url, signal, axios });
};
exports.getSearchPosts = getSearchPosts;
async function posts({ url, signal, axios, }) {
try {
const res = await axios.get(url, { signal });
const data = res.data?.results;
const catalog = [];
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 [];
}
}

View File

@@ -1,54 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getStream = void 0;
const types_1 = require("../types");
const getStream = async function ({ link: id, providerContext, }) {
try {
const { getBaseUrl, axios } = providerContext;
const baseUrl = await getBaseUrl("consumet");
const servers = ["vidcloud", "vidstreaming"];
const url = `${baseUrl}/anime/zoro/watch?episodeId=${id}&server=`;
const streamLinks = [];
await Promise.all(servers.map(async (server) => {
try {
const res = await axios.get(url + server);
if (res.data) {
const subtitles = [];
res.data?.subtitles.forEach((sub) => {
if (sub?.lang === "Thumbnails")
return;
subtitles.push({
language: sub?.lang?.slice(0, 2) || "Und",
uri: sub?.url,
title: sub?.lang || "Undefined",
type: sub?.url?.endsWith(".vtt")
? types_1.TextTrackType.VTT
: types_1.TextTrackType.SUBRIP,
});
});
res.data?.sources.forEach((source) => {
streamLinks.push({
server: server,
link: source?.url,
type: 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;