From 784e2ad5c34bcfef36a3f69e9e9acd7cbb3d6428 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 11 Jul 2023 09:21:13 +0200 Subject: Prefer web videos in favour of webtorrent --- server/controllers/static.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'server/controllers/static.ts') diff --git a/server/controllers/static.ts b/server/controllers/static.ts index bbd0dd011..5ce739bfc 100644 --- a/server/controllers/static.ts +++ b/server/controllers/static.ts @@ -6,7 +6,7 @@ import { injectQueryToPlaylistUrls } from '@server/lib/hls' import { asyncMiddleware, ensureCanAccessPrivateVideoHLSFiles, - ensureCanAccessVideoPrivateWebTorrentFiles, + ensureCanAccessVideoPrivateWebVideoFiles, handleStaticError, optionalAuthenticate } from '@server/middlewares' @@ -21,16 +21,16 @@ const staticRouter = express.Router() staticRouter.use(cors()) // --------------------------------------------------------------------------- -// WebTorrent/Classic videos +// Web videos/Classic videos // --------------------------------------------------------------------------- -const privateWebTorrentStaticMiddlewares = CONFIG.STATIC_FILES.PRIVATE_FILES_REQUIRE_AUTH === true - ? [ optionalAuthenticate, asyncMiddleware(ensureCanAccessVideoPrivateWebTorrentFiles) ] +const privateWebVideoStaticMiddlewares = CONFIG.STATIC_FILES.PRIVATE_FILES_REQUIRE_AUTH === true + ? [ optionalAuthenticate, asyncMiddleware(ensureCanAccessVideoPrivateWebVideoFiles) ] : [] staticRouter.use( STATIC_PATHS.PRIVATE_WEBSEED, - ...privateWebTorrentStaticMiddlewares, + ...privateWebVideoStaticMiddlewares, express.static(DIRECTORIES.VIDEOS.PRIVATE, { fallthrough: false }), handleStaticError ) -- cgit v1.2.3