aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/controllers/api/videos/source.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/controllers/api/videos/source.ts b/server/controllers/api/videos/source.ts
index b20c4af0e..75fe68b6c 100644
--- a/server/controllers/api/videos/source.ts
+++ b/server/controllers/api/videos/source.ts
@@ -14,7 +14,7 @@ import { openapiOperationDoc } from '@server/middlewares/doc'
14import { VideoModel } from '@server/models/video/video' 14import { VideoModel } from '@server/models/video/video'
15import { VideoSourceModel } from '@server/models/video/video-source' 15import { VideoSourceModel } from '@server/models/video/video-source'
16import { MStreamingPlaylistFiles, MVideo, MVideoFile, MVideoFullLight } from '@server/types/models' 16import { MStreamingPlaylistFiles, MVideo, MVideoFile, MVideoFullLight } from '@server/types/models'
17import { HttpStatusCode, VideoState } from '@shared/models' 17import { VideoState } from '@shared/models'
18import { logger, loggerTagsFactory } from '../../../helpers/logger' 18import { logger, loggerTagsFactory } from '../../../helpers/logger'
19import { 19import {
20 asyncMiddleware, 20 asyncMiddleware,
@@ -121,7 +121,7 @@ async function replaceVideoSourceResumable (req: express.Request, res: express.R
121 121
122 await removeOldFiles({ video, files: oldWebVideoFiles, playlists: oldStreamingPlaylists }) 122 await removeOldFiles({ video, files: oldWebVideoFiles, playlists: oldStreamingPlaylists })
123 123
124 await VideoSourceModel.create({ 124 const source = await VideoSourceModel.create({
125 filename: originalFilename, 125 filename: originalFilename,
126 videoId: video.id, 126 videoId: video.id,
127 createdAt: inputFileUpdatedAt 127 createdAt: inputFileUpdatedAt
@@ -135,7 +135,7 @@ async function replaceVideoSourceResumable (req: express.Request, res: express.R
135 135
136 Hooks.runAction('action:api.video.file-updated', { video, req, res }) 136 Hooks.runAction('action:api.video.file-updated', { video, req, res })
137 137
138 return res.sendStatus(HttpStatusCode.NO_CONTENT_204) 138 return res.json(source.toFormattedJSON())
139 } finally { 139 } finally {
140 videoFileMutexReleaser() 140 videoFileMutexReleaser()
141 } 141 }