aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/videos/upload.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-12-10 13:49:19 +0100
committerChocobozzz <me@florianbigard.com>2021-12-10 13:51:44 +0100
commitd17d743051c5716e1e08cd8870d718cfd6a57f0c (patch)
tree2f8c8d1a08467f35c5ede18001fc18cb2bafafef /server/controllers/api/videos/upload.ts
parent8cf43a6524d354fbfa0f0eaf789e8d4756bd25d6 (diff)
downloadPeerTube-d17d743051c5716e1e08cd8870d718cfd6a57f0c.tar.gz
PeerTube-d17d743051c5716e1e08cd8870d718cfd6a57f0c.tar.zst
PeerTube-d17d743051c5716e1e08cd8870d718cfd6a57f0c.zip
Add upload/import/go live video attributes hooks
Diffstat (limited to 'server/controllers/api/videos/upload.ts')
-rw-r--r--server/controllers/api/videos/upload.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/controllers/api/videos/upload.ts b/server/controllers/api/videos/upload.ts
index c827f6bf0..1be87f746 100644
--- a/server/controllers/api/videos/upload.ts
+++ b/server/controllers/api/videos/upload.ts
@@ -153,7 +153,8 @@ async function addVideo (options: {
153 const videoChannel = res.locals.videoChannel 153 const videoChannel = res.locals.videoChannel
154 const user = res.locals.oauth.token.User 154 const user = res.locals.oauth.token.User
155 155
156 const videoData = buildLocalVideoFromReq(videoInfo, videoChannel.id) 156 let videoData = buildLocalVideoFromReq(videoInfo, videoChannel.id)
157 videoData = await Hooks.wrapObject(videoData, 'filter:api.video.upload.video-attribute.result')
157 158
158 videoData.state = buildNextVideoState() 159 videoData.state = buildNextVideoState()
159 videoData.duration = videoPhysicalFile.duration // duration was added by a previous middleware 160 videoData.duration = videoPhysicalFile.duration // duration was added by a previous middleware