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:
commit
037197a7e9
16 changed files with 138 additions and 96 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue