From 40298b02546e8225dd21bf6048fe7f224aefc32a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 2 Oct 2017 12:20:26 +0200 Subject: Implement video transcoding on server side --- server/controllers/api/videos/index.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'server/controllers/api') diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts index 6fa84c801..14c969ec3 100644 --- a/server/controllers/api/videos/index.ts +++ b/server/controllers/api/videos/index.ts @@ -39,13 +39,12 @@ import { getFormattedObjects, renamePromise } from '../../../helpers' -import { TagInstance } from '../../../models' -import { VideoCreate, VideoUpdate } from '../../../../shared' +import { TagInstance, VideoInstance } from '../../../models' +import { VideoCreate, VideoUpdate, VideoResolution } from '../../../../shared' import { abuseVideoRouter } from './abuse' import { blacklistRouter } from './blacklist' import { rateVideoRouter } from './rate' -import { VideoInstance } from '../../../models/video/video-interface' const videosRouter = express.Router() @@ -195,7 +194,7 @@ function addVideo (req: express.Request, res: express.Response, videoPhysicalFil .then(({ author, tagInstances, video }) => { const videoFileData = { extname: extname(videoPhysicalFile.filename), - resolution: 0, // TODO: improve readability, + resolution: VideoResolution.ORIGINAL, size: videoPhysicalFile.size } @@ -230,7 +229,7 @@ function addVideo (req: express.Request, res: express.Response, videoPhysicalFil } tasks.push( - JobScheduler.Instance.createJob(t, 'videoTranscoder', dataInput) + JobScheduler.Instance.createJob(t, 'videoFileOptimizer', dataInput) ) } -- cgit v1.2.3