aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-02-27 15:57:28 +0100
committerChocobozzz <me@florianbigard.com>2018-02-27 15:57:43 +0100
commit056aa7f2b4de1ef128a5fd35527de6dd7a9ebad1 (patch)
treebf59c7f52be7da2d6bfd7ee18814b9c7f8463966 /server/controllers/api
parent6fdc553adb23db216b44e425a85ea76bdf0a2a40 (diff)
downloadPeerTube-056aa7f2b4de1ef128a5fd35527de6dd7a9ebad1.tar.gz
PeerTube-056aa7f2b4de1ef128a5fd35527de6dd7a9ebad1.tar.zst
PeerTube-056aa7f2b4de1ef128a5fd35527de6dd7a9ebad1.zip
Fix resolution for portrait videos
Diffstat (limited to 'server/controllers/api')
-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)