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

Add upload/import/go live video attributes hooks

This commit is contained in:
Chocobozzz 2021-12-10 13:49:19 +01:00
parent 8cf43a6524
commit d17d743051
No known key found for this signature in database
GPG key ID: 583A612D890159BE
6 changed files with 98 additions and 6 deletions

View file

@ -153,7 +153,8 @@ async function addVideo (options: {
const videoChannel = res.locals.videoChannel
const user = res.locals.oauth.token.User
const videoData = buildLocalVideoFromReq(videoInfo, videoChannel.id)
let videoData = buildLocalVideoFromReq(videoInfo, videoChannel.id)
videoData = await Hooks.wrapObject(videoData, 'filter:api.video.upload.video-attribute.result')
videoData.state = buildNextVideoState()
videoData.duration = videoPhysicalFile.duration // duration was added by a previous middleware