diff options
author | Chocobozzz <me@florianbigard.com> | 2019-12-03 10:41:23 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-12-03 10:41:23 +0100 |
commit | eccf70f020cb8b0d9ceddc2561713ccfddb72095 (patch) | |
tree | bae9d9285a00c2958666becbb50427cabcea7aed /server/controllers/static.ts | |
parent | 3f6b7aa1cfa28ee02eec8c8ab16b623f2bbab928 (diff) | |
download | PeerTube-eccf70f020cb8b0d9ceddc2561713ccfddb72095.tar.gz PeerTube-eccf70f020cb8b0d9ceddc2561713ccfddb72095.tar.zst PeerTube-eccf70f020cb8b0d9ceddc2561713ccfddb72095.zip |
Fix private video download
Diffstat (limited to 'server/controllers/static.ts')
-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 | ||