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