stream local files to player

This commit is contained in:
2026-01-05 13:21:54 +01:00
parent 5b5cedcc98
commit 5fd2341e8e
15 changed files with 1869 additions and 275 deletions

View File

@@ -5,13 +5,19 @@ async function localRoutes(fastify: FastifyInstance) {
fastify.post('/library/scan', controller.scanLibrary);
fastify.get('/library/:type', controller.listEntries);
fastify.get('/library/:type/:id', controller.getEntry);
// Streaming básico (legacy)
fastify.get('/library/stream/:type/:id/:unit', controller.streamUnit);
fastify.get('/library/stream/:type/:id/:unit/subs/:track', controller.getSubtitle);
fastify.post('/library/:type/:id/match', controller.matchEntry);
fastify.get('/library/:id/units', controller.getUnits);
fastify.get('/library/:unitId/manifest', controller.getManifest);
fastify.get('/library/:unitId/resource/:resId', controller.getPage);
fastify.post('/library/download/anime', controller.downloadAnime);
fastify.post('/library/download/book', controller.downloadBook);
fastify.get('/library/downloads/status', controller.getDownloadStatus);
fastify.get('/library/stream/:type/:id/:unit/manifest', controller.getAnimeStreamManifest);
fastify.get('/library/hls/:hash/:filename', controller.serveHLSFile);
}
export default localRoutes;