diff options
Diffstat (limited to 'server/controllers')
-rw-r--r-- | server/controllers/static.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/server/controllers/static.ts b/server/controllers/static.ts index 7c900be92..0aab12756 100644 --- a/server/controllers/static.ts +++ b/server/controllers/static.ts | |||
@@ -10,7 +10,7 @@ import { | |||
10 | WEBSERVER | 10 | WEBSERVER |
11 | } from '../initializers/constants' | 11 | } from '../initializers/constants' |
12 | import { cacheRoute } from '../middlewares/cache' | 12 | import { cacheRoute } from '../middlewares/cache' |
13 | import { asyncMiddleware, videosGetValidator } from '../middlewares' | 13 | import { asyncMiddleware, videosDownloadValidator } from '../middlewares' |
14 | import { VideoModel } from '../models/video/video' | 14 | import { VideoModel } from '../models/video/video' |
15 | import { UserModel } from '../models/account/user' | 15 | import { UserModel } from '../models/account/user' |
16 | import { VideoCommentModel } from '../models/video/video-comment' | 16 | import { VideoCommentModel } from '../models/video/video-comment' |
@@ -39,12 +39,12 @@ staticRouter.use( | |||
39 | ) | 39 | ) |
40 | staticRouter.use( | 40 | staticRouter.use( |
41 | STATIC_DOWNLOAD_PATHS.TORRENTS + ':id-:resolution([0-9]+).torrent', | 41 | STATIC_DOWNLOAD_PATHS.TORRENTS + ':id-:resolution([0-9]+).torrent', |
42 | asyncMiddleware(videosGetValidator), | 42 | asyncMiddleware(videosDownloadValidator), |
43 | asyncMiddleware(downloadTorrent) | 43 | asyncMiddleware(downloadTorrent) |
44 | ) | 44 | ) |
45 | staticRouter.use( | 45 | staticRouter.use( |
46 | STATIC_DOWNLOAD_PATHS.TORRENTS + ':id-:resolution([0-9]+)-hls.torrent', | 46 | STATIC_DOWNLOAD_PATHS.TORRENTS + ':id-:resolution([0-9]+)-hls.torrent', |
47 | asyncMiddleware(videosGetValidator), | 47 | asyncMiddleware(videosDownloadValidator), |
48 | asyncMiddleware(downloadHLSVideoFileTorrent) | 48 | asyncMiddleware(downloadHLSVideoFileTorrent) |
49 | ) | 49 | ) |
50 | 50 | ||
@@ -62,13 +62,13 @@ staticRouter.use( | |||
62 | 62 | ||
63 | staticRouter.use( | 63 | staticRouter.use( |
64 | STATIC_DOWNLOAD_PATHS.VIDEOS + ':id-:resolution([0-9]+).:extension', | 64 | STATIC_DOWNLOAD_PATHS.VIDEOS + ':id-:resolution([0-9]+).:extension', |
65 | asyncMiddleware(videosGetValidator), | 65 | asyncMiddleware(videosDownloadValidator), |
66 | asyncMiddleware(downloadVideoFile) | 66 | asyncMiddleware(downloadVideoFile) |
67 | ) | 67 | ) |
68 | 68 | ||
69 | staticRouter.use( | 69 | staticRouter.use( |
70 | STATIC_DOWNLOAD_PATHS.HLS_VIDEOS + ':id-:resolution([0-9]+)-fragmented.:extension', | 70 | STATIC_DOWNLOAD_PATHS.HLS_VIDEOS + ':id-:resolution([0-9]+)-fragmented.:extension', |
71 | asyncMiddleware(videosGetValidator), | 71 | asyncMiddleware(videosDownloadValidator), |
72 | asyncMiddleware(downloadHLSVideoFile) | 72 | asyncMiddleware(downloadHLSVideoFile) |
73 | ) | 73 | ) |
74 | 74 | ||