added manga and added sdk source

This commit is contained in:
2026-10-14 22:29:04 -07:00
parent efc332a9fa
commit 4b255c7ee0
6 changed files with 376 additions and 8 deletions

View File

@@ -13,17 +13,20 @@ const CONFIG = {
TV_ID: "37854", // TV TMDB ID to test, for anime I recommend using a random ID like 37854
TV_SEASON: "1", // TV Season to test
TV_EPISODE: "1", // TV Episode to test
STREAM_SOURCE: "", // Source key to test
STREAM_SOURCE: "atsu", // Source key to test
TEST_SUBTITLE: false, // Toggle subtitle testing
TEST_DOWNLOAD: false, // Toggle download testing
TEST_MOVIE: true, // Toggle movie testing
TEST_TV: true, // Toggle TV testing
TEST_SUBTITLE: false,
TEST_DOWNLOAD: false,
TEST_MOVIE: false,
TEST_TV: false,
TEST_MANGA: true,
MANGA_QUERY: "Steel Ball Run",
EXTRA_SDK_PARAMS: { // Additional parameters for the SDK constructor
EXTRA_SDK_PARAMS: {
// penguManifest: ""
}
};
dotenv.config({
debug: CONFIG.DEBUG
});
@@ -189,4 +192,33 @@ if (CONFIG.TEST_TV) {
}
} else {
console.log("\nSkipped Stream Test");
}
if (CONFIG.TEST_MANGA) {
try {
console.log(`\nSearching Manga for: "${CONFIG.MANGA_QUERY}"`);
const searchRes = await sdk.searchManga(CONFIG.MANGA_QUERY, 1, 5);
console.log("Manga Search Found:", searchRes.total);
console.log("Top Hit:", searchRes.results[0]);
if (searchRes.results.length > 0) {
const mangaId = searchRes.results[0].id;
console.log(`\nFetching Manga Details for ID: ${mangaId}`);
const mangaDetails = await sdk.getManga(mangaId);
console.log("Manga Title:", mangaDetails.title);
console.log("Total Chapters:", mangaDetails.totalChapters);
const firstChapter = mangaDetails.chapters[mangaDetails.chapters.length - 1] || mangaDetails.chapters[0];
if (firstChapter) {
console.log(`\nFetching Pages for Chapter: ${firstChapter.title} (${firstChapter.id})`);
const chapterPages = await sdk.getMangaChapter(mangaId, firstChapter.id);
console.log("Page Count:", chapterPages.pages.length);
console.log("Sample First Page:", chapterPages.pages[0]);
}
}
} catch (err) {
console.error("Manga Test Error:", err.message);
}
} else {
console.log("\nSkipped Manga Test");
}