1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-03 17:59:37 +02:00

Remove deprecated server code

This commit is contained in:
Chocobozzz 2024-11-04 10:16:31 +01:00
parent 11fd3a4618
commit 3842a527f6
No known key found for this signature in database
GPG key ID: 583A612D890159BE
39 changed files with 40 additions and 173 deletions

View file

@ -1,7 +1,4 @@
import cors from 'cors'
import express from 'express'
import { readFile } from 'fs/promises'
import { join } from 'path'
import { HttpStatusCode } from '@peertube/peertube-models'
import { injectQueryToPlaylistUrls } from '@server/lib/hls.js'
import {
asyncMiddleware,
@ -10,9 +7,12 @@ import {
handleStaticError,
optionalAuthenticate
} from '@server/middlewares/index.js'
import { HttpStatusCode } from '@peertube/peertube-models'
import cors from 'cors'
import express from 'express'
import { readFile } from 'fs/promises'
import { join } from 'path'
import { CONFIG } from '../initializers/config.js'
import { DIRECTORIES, STATIC_MAX_AGE, STATIC_PATHS } from '../initializers/constants.js'
import { DIRECTORIES, STATIC_PATHS } from '../initializers/constants.js'
import { buildReinjectVideoFileTokenQuery, doReinjectVideoFileToken } from './shared/m3u8-playlist.js'
const staticRouter = express.Router()
@ -72,14 +72,6 @@ staticRouter.use(
handleStaticError
)
// FIXME: deprecated in v6, to remove
const thumbnailsPhysicalPath = CONFIG.STORAGE.THUMBNAILS_DIR
staticRouter.use(
STATIC_PATHS.THUMBNAILS,
express.static(thumbnailsPhysicalPath, { maxAge: STATIC_MAX_AGE.SERVER, fallthrough: false }),
handleStaticError
)
// ---------------------------------------------------------------------------
export {