mirror of
https://github.com/Shineii86/AniKotoAPI.git
synced 2026-10-22 19:05:11 +00:00
feat: complete streaming and AJAX endpoint support
- Add stream URL extraction via /ajax/server?get={linkId}
- Add mapper API integration for gogoanime/anivibe servers
- Add /api/seasons/:id endpoint
- Add /api/watch-order/:id endpoint
- Add /api/episodes-ajax/:id endpoint
- Add /api/servers endpoint
- Add genre/type/status/rating ID mappings
- Fix filter to use correct numeric IDs
- Fix watch page data attribute extraction
This commit is contained in:
+44
-1
@@ -2,7 +2,8 @@ import { getHomeInfo } from "../controllers/homeInfo.controller.js";
|
||||
import { getAnimeInfo } from "../controllers/animeInfo.controller.js";
|
||||
import { getSearchResults, getSearchSuggestions } from "../controllers/search.controller.js";
|
||||
import { getEpisodeList } from "../controllers/episodeList.controller.js";
|
||||
import { getStreamInfo } from "../controllers/streamInfo.controller.js";
|
||||
import { getEpisodeListAjax } from "../controllers/episodeListAjax.controller.js";
|
||||
import { getStreamInfo, getServerList, getMapperServers } from "../controllers/streamInfo.controller.js";
|
||||
import { getSchedule } from "../controllers/schedule.controller.js";
|
||||
import { getSpotlight } from "../controllers/spotlight.controller.js";
|
||||
import { getTrending } from "../controllers/trending.controller.js";
|
||||
@@ -16,6 +17,8 @@ import { getAzList } from "../controllers/azList.controller.js";
|
||||
import { getNewRelease, getNewlyAdded } from "../controllers/newRelease.controller.js";
|
||||
import { getStatus } from "../controllers/status.controller.js";
|
||||
import { getTrendingSidebar } from "../controllers/trendingSidebar.controller.js";
|
||||
import { getSeasons } from "../controllers/seasons.controller.js";
|
||||
import { getWatchOrder } from "../controllers/watchOrder.controller.js";
|
||||
import { categoryRoutes } from "./category.route.js";
|
||||
|
||||
const createApiRoutes = (app, jsonResponse, jsonError) => {
|
||||
@@ -67,6 +70,14 @@ const createApiRoutes = (app, jsonResponse, jsonError) => {
|
||||
}
|
||||
});
|
||||
|
||||
app.get("/api/episodes-ajax/:id", async (req, res, next) => {
|
||||
try {
|
||||
await getEpisodeListAjax(req, res, next);
|
||||
} catch (error) {
|
||||
jsonError(res, error.message);
|
||||
}
|
||||
});
|
||||
|
||||
app.get("/api/stream", async (req, res, next) => {
|
||||
try {
|
||||
await getStreamInfo(req, res, next);
|
||||
@@ -75,6 +86,22 @@ const createApiRoutes = (app, jsonResponse, jsonError) => {
|
||||
}
|
||||
});
|
||||
|
||||
app.get("/api/servers", async (req, res, next) => {
|
||||
try {
|
||||
await getServerList(req, res, next);
|
||||
} catch (error) {
|
||||
jsonError(res, error.message);
|
||||
}
|
||||
});
|
||||
|
||||
app.get("/api/mapper-servers", async (req, res, next) => {
|
||||
try {
|
||||
await getMapperServers(req, res, next);
|
||||
} catch (error) {
|
||||
jsonError(res, error.message);
|
||||
}
|
||||
});
|
||||
|
||||
app.get("/api/schedule", async (req, res, next) => {
|
||||
try {
|
||||
await getSchedule(req, res, next);
|
||||
@@ -163,6 +190,22 @@ const createApiRoutes = (app, jsonResponse, jsonError) => {
|
||||
}
|
||||
});
|
||||
|
||||
app.get("/api/seasons/:id", async (req, res, next) => {
|
||||
try {
|
||||
await getSeasons(req, res, next);
|
||||
} catch (error) {
|
||||
jsonError(res, error.message);
|
||||
}
|
||||
});
|
||||
|
||||
app.get("/api/watch-order/:id", async (req, res, next) => {
|
||||
try {
|
||||
await getWatchOrder(req, res, next);
|
||||
} catch (error) {
|
||||
jsonError(res, error.message);
|
||||
}
|
||||
});
|
||||
|
||||
app.get("/api/az-list/:letter", async (req, res, next) => {
|
||||
try {
|
||||
await getAzList(req, res, next);
|
||||
|
||||
Reference in New Issue
Block a user