aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-12-03 10:41:23 +0100
committerChocobozzz <me@florianbigard.com>2019-12-03 10:41:23 +0100
commiteccf70f020cb8b0d9ceddc2561713ccfddb72095 (patch)
treebae9d9285a00c2958666becbb50427cabcea7aed /server/controllers
parent3f6b7aa1cfa28ee02eec8c8ab16b623f2bbab928 (diff)
downloadPeerTube-eccf70f020cb8b0d9ceddc2561713ccfddb72095.tar.gz
PeerTube-eccf70f020cb8b0d9ceddc2561713ccfddb72095.tar.zst
PeerTube-eccf70f020cb8b0d9ceddc2561713ccfddb72095.zip
Fix private video download
Diffstat (limited to 'server/controllers')
-rw-r--r--server/controllers/static.ts10
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'
12import { cacheRoute } from '../middlewares/cache' 12import { cacheRoute } from '../middlewares/cache'
13import { asyncMiddleware, videosGetValidator } from '../middlewares' 13import { asyncMiddleware, videosDownloadValidator } from '../middlewares'
14import { VideoModel } from '../models/video/video' 14import { VideoModel } from '../models/video/video'
15import { UserModel } from '../models/account/user' 15import { UserModel } from '../models/account/user'
16import { VideoCommentModel } from '../models/video/video-comment' 16import { VideoCommentModel } from '../models/video/video-comment'
@@ -39,12 +39,12 @@ staticRouter.use(
39) 39)
40staticRouter.use( 40staticRouter.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)
45staticRouter.use( 45staticRouter.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
63staticRouter.use( 63staticRouter.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
69staticRouter.use( 69staticRouter.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