diff options
Diffstat (limited to 'server/controllers/api')
-rw-r--r-- | server/controllers/api/videos/index.ts | 6 |
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' | |||
3 | import { VideoCreate, VideoPrivacy, VideoUpdate } from '../../../../shared' | 3 | import { VideoCreate, VideoPrivacy, VideoUpdate } from '../../../../shared' |
4 | import { renamePromise } from '../../../helpers/core-utils' | 4 | import { renamePromise } from '../../../helpers/core-utils' |
5 | import { retryTransactionWrapper } from '../../../helpers/database-utils' | 5 | import { retryTransactionWrapper } from '../../../helpers/database-utils' |
6 | import { getVideoFileHeight } from '../../../helpers/ffmpeg-utils' | 6 | import { getVideoFileResolution } from '../../../helpers/ffmpeg-utils' |
7 | import { processImage } from '../../../helpers/image-utils' | 7 | import { processImage } from '../../../helpers/image-utils' |
8 | import { logger } from '../../../helpers/logger' | 8 | import { logger } from '../../../helpers/logger' |
9 | import { createReqFiles, getFormattedObjects, getServerActor, resetSequelizeInstance } from '../../../helpers/utils' | 9 | import { 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) |