aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/videos/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/videos/index.ts')
-rw-r--r--server/controllers/api/videos/index.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts
index b4ced8c1e..8c93ae89c 100644
--- a/server/controllers/api/videos/index.ts
+++ b/server/controllers/api/videos/index.ts
@@ -2,7 +2,7 @@ import * as express from 'express'
2import { extname, join } from 'path' 2import { extname, join } from 'path'
3import { VideoCreate, VideoPrivacy, VideoState, VideoUpdate } from '../../../../shared' 3import { VideoCreate, VideoPrivacy, VideoState, VideoUpdate } from '../../../../shared'
4import { renamePromise } from '../../../helpers/core-utils' 4import { renamePromise } from '../../../helpers/core-utils'
5import { getVideoFileResolution } from '../../../helpers/ffmpeg-utils' 5import { getVideoFileFPS, getVideoFileResolution } from '../../../helpers/ffmpeg-utils'
6import { processImage } from '../../../helpers/image-utils' 6import { processImage } from '../../../helpers/image-utils'
7import { logger } from '../../../helpers/logger' 7import { logger } from '../../../helpers/logger'
8import { getFormattedObjects, getServerActor, resetSequelizeInstance } from '../../../helpers/utils' 8import { getFormattedObjects, getServerActor, resetSequelizeInstance } from '../../../helpers/utils'
@@ -184,10 +184,13 @@ async function addVideo (req: express.Request, res: express.Response) {
184 184
185 // Build the file object 185 // Build the file object
186 const { videoFileResolution } = await getVideoFileResolution(videoPhysicalFile.path) 186 const { videoFileResolution } = await getVideoFileResolution(videoPhysicalFile.path)
187 const fps = await getVideoFileFPS(videoPhysicalFile.path)
188
187 const videoFileData = { 189 const videoFileData = {
188 extname: extname(videoPhysicalFile.filename), 190 extname: extname(videoPhysicalFile.filename),
189 resolution: videoFileResolution, 191 resolution: videoFileResolution,
190 size: videoPhysicalFile.size 192 size: videoPhysicalFile.size,
193 fps
191 } 194 }
192 const videoFile = new VideoFileModel(videoFileData) 195 const videoFile = new VideoFileModel(videoFileData)
193 196