1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-03 17:59:37 +02:00

Add house-keeping script

This commit is contained in:
Chocobozzz 2024-06-05 14:43:41 +02:00
parent 9b483bcb78
commit 2b189131fa
No known key found for this signature in database
GPG key ID: 583A612D890159BE
22 changed files with 368 additions and 133 deletions

View file

@ -123,6 +123,5 @@ async function getTorrent (req: express.Request, res: express.Response) {
const result = await VideoTorrentsSimpleFileCache.Instance.getFilePath(req.params.filename)
if (!result) return res.status(HttpStatusCode.NOT_FOUND_404).end()
// Torrents still use the old naming convention (video uuid + .torrent)
return res.sendFile(result.path, { maxAge: STATIC_MAX_AGE.SERVER })
}