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

Merge branch 'release/7.2.0' into develop

This commit is contained in:
Chocobozzz 2025-07-08 16:46:46 +02:00
commit 037197a7e9
No known key found for this signature in database
GPG key ID: 583A612D890159BE
16 changed files with 138 additions and 96 deletions

View file

@ -1,6 +1,7 @@
import { buildFileLocale, getCompleteLocale, is18nLocale, LOCALE_FILES } from '@peertube/peertube-core-utils'
import { HttpStatusCode } from '@peertube/peertube-models'
import { currentDir, root } from '@peertube/peertube-node-utils'
import { toCompleteUUID } from '@server/helpers/custom-validators/misc.js'
import { logger } from '@server/helpers/logger.js'
import { CONFIG } from '@server/initializers/config.js'
import { Hooks } from '@server/lib/plugins/hooks.js'
@ -120,6 +121,8 @@ function serveServerTranslations (req: express.Request, res: express.Response) {
}
async function generateVideoEmbedHtmlPage (req: express.Request, res: express.Response) {
req.params.id = toCompleteUUID(req.params.id)
const allowParameters = { req }
const allowedResult = await Hooks.wrapFun(
@ -140,6 +143,8 @@ async function generateVideoEmbedHtmlPage (req: express.Request, res: express.Re
}
async function generateVideoPlaylistEmbedHtmlPage (req: express.Request, res: express.Response) {
req.params.id = toCompleteUUID(req.params.id)
const allowParameters = { req }
const allowedResult = await Hooks.wrapFun(
@ -167,12 +172,16 @@ async function generateWatchHtmlPage (req: express.Request, res: express.Respons
const threadIdIndex = videoId.indexOf(';threadId')
if (threadIdIndex !== -1) videoId = videoId.substring(0, threadIdIndex)
videoId = toCompleteUUID(videoId)
const html = await ClientHtml.getWatchHTMLPage(videoId, req, res)
return sendHTML(html, res, true)
}
async function generateWatchPlaylistHtmlPage (req: express.Request, res: express.Response) {
req.params.id = toCompleteUUID(req.params.id)
const html = await ClientHtml.getWatchPlaylistHTMLPage(req.params.id + '', req, res)
return sendHTML(html, res, true)