From 8efc27bf14f1fe3ed23cd8a6d2de1f0918a7f769 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 18 Feb 2021 11:28:00 +0100 Subject: Cleanup --- server/controllers/api/videos/index.ts | 2 +- server/controllers/lazy-static.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'server/controllers') diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts index dcd6194ae..e89315930 100644 --- a/server/controllers/api/videos/index.ts +++ b/server/controllers/api/videos/index.ts @@ -222,7 +222,7 @@ async function addVideo (req: express.Request, res: express.Response) { }) // Create the torrent file - await createTorrentAndSetInfoHash(video, video, videoFile) + await createTorrentAndSetInfoHash(video, videoFile) const { videoCreated } = await sequelizeTypescript.transaction(async t => { const sequelizeOptions = { transaction: t } diff --git a/server/controllers/lazy-static.ts b/server/controllers/lazy-static.ts index c2f5c7b56..4e553479b 100644 --- a/server/controllers/lazy-static.ts +++ b/server/controllers/lazy-static.ts @@ -94,5 +94,6 @@ async function getTorrent (req: express.Request, res: express.Response) { const result = await VideosTorrentCache.Instance.getFilePath(req.params.filename) if (!result) return res.sendStatus(HttpStatusCode.NOT_FOUND_404) + // Torrents still use the old naming convention (video uuid + .torrent) return res.sendFile(result.path, { maxAge: STATIC_MAX_AGE.SERVER }) } -- cgit v1.2.3