aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/videos
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/videos')
-rw-r--r--server/controllers/api/videos/index.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts
index c3d3acd26..10b309cd1 100644
--- a/server/controllers/api/videos/index.ts
+++ b/server/controllers/api/videos/index.ts
@@ -3,7 +3,7 @@ import { extname, join } from 'path'
3import { VideoCreate, VideoPrivacy, VideoUpdate } from '../../../../shared' 3import { VideoCreate, VideoPrivacy, VideoUpdate } from '../../../../shared'
4import { renamePromise } from '../../../helpers/core-utils' 4import { renamePromise } from '../../../helpers/core-utils'
5import { retryTransactionWrapper } from '../../../helpers/database-utils' 5import { retryTransactionWrapper } from '../../../helpers/database-utils'
6import { getVideoFileHeight } from '../../../helpers/ffmpeg-utils' 6import { getVideoFileResolution } from '../../../helpers/ffmpeg-utils'
7import { processImage } from '../../../helpers/image-utils' 7import { processImage } from '../../../helpers/image-utils'
8import { logger } from '../../../helpers/logger' 8import { logger } from '../../../helpers/logger'
9import { createReqFiles, getFormattedObjects, getServerActor, resetSequelizeInstance } from '../../../helpers/utils' 9import { createReqFiles, getFormattedObjects, getServerActor, resetSequelizeInstance } from '../../../helpers/utils'
@@ -187,11 +187,11 @@ async function addVideo (req: express.Request, res: express.Response, videoPhysi
187 const video = new VideoModel(videoData) 187 const video = new VideoModel(videoData)
188 video.url = getVideoActivityPubUrl(video) 188 video.url = getVideoActivityPubUrl(video)
189 189
190 const videoFileHeight = await getVideoFileHeight(videoPhysicalFile.path) 190 const { videoFileResolution } = await getVideoFileResolution(videoPhysicalFile.path)
191 191
192 const videoFileData = { 192 const videoFileData = {
193 extname: extname(videoPhysicalFile.filename), 193 extname: extname(videoPhysicalFile.filename),
194 resolution: videoFileHeight, 194 resolution: videoFileResolution,
195 size: videoPhysicalFile.size 195 size: videoPhysicalFile.size
196 } 196 }
197 const videoFile = new VideoFileModel(videoFileData) 197 const videoFile = new VideoFileModel(videoFileData)