From 056aa7f2b4de1ef128a5fd35527de6dd7a9ebad1 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 27 Feb 2018 15:57:28 +0100 Subject: Fix resolution for portrait videos --- server/controllers/api/videos/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'server/controllers/api/videos') 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' import { VideoCreate, VideoPrivacy, VideoUpdate } from '../../../../shared' import { renamePromise } from '../../../helpers/core-utils' import { retryTransactionWrapper } from '../../../helpers/database-utils' -import { getVideoFileHeight } from '../../../helpers/ffmpeg-utils' +import { getVideoFileResolution } from '../../../helpers/ffmpeg-utils' import { processImage } from '../../../helpers/image-utils' import { logger } from '../../../helpers/logger' import { createReqFiles, getFormattedObjects, getServerActor, resetSequelizeInstance } from '../../../helpers/utils' @@ -187,11 +187,11 @@ async function addVideo (req: express.Request, res: express.Response, videoPhysi const video = new VideoModel(videoData) video.url = getVideoActivityPubUrl(video) - const videoFileHeight = await getVideoFileHeight(videoPhysicalFile.path) + const { videoFileResolution } = await getVideoFileResolution(videoPhysicalFile.path) const videoFileData = { extname: extname(videoPhysicalFile.filename), - resolution: videoFileHeight, + resolution: videoFileResolution, size: videoPhysicalFile.size } const videoFile = new VideoFileModel(videoFileData) -- cgit v1.2.3