- const result = await VideosCaptionCache.Instance.getFilePath({
- videoId: req.params.videoId,
- language: req.params.captionLanguage
- })
+ const result = await VideosCaptionCache.Instance.getFilePath(req.params.filename)
+ if (!result) return res.sendStatus(HttpStatusCode.NOT_FOUND_404)
+
+ return res.sendFile(result.path, { maxAge: STATIC_MAX_AGE.LAZY_SERVER })
+}
+
+async function getTorrent (req: express.Request, res: express.Response) {
+ const result = await VideosTorrentCache.Instance.getFilePath(req.params.filename)