diff options
Diffstat (limited to 'server/controllers/api')
-rw-r--r-- | server/controllers/api/videos/index.ts | 9 |
1 files changed, 4 insertions, 5 deletions
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 { | |||
39 | getFormattedObjects, | 39 | getFormattedObjects, |
40 | renamePromise | 40 | renamePromise |
41 | } from '../../../helpers' | 41 | } from '../../../helpers' |
42 | import { TagInstance } from '../../../models' | 42 | import { TagInstance, VideoInstance } from '../../../models' |
43 | import { VideoCreate, VideoUpdate } from '../../../../shared' | 43 | import { VideoCreate, VideoUpdate, VideoResolution } from '../../../../shared' |
44 | 44 | ||
45 | import { abuseVideoRouter } from './abuse' | 45 | import { abuseVideoRouter } from './abuse' |
46 | import { blacklistRouter } from './blacklist' | 46 | import { blacklistRouter } from './blacklist' |
47 | import { rateVideoRouter } from './rate' | 47 | import { rateVideoRouter } from './rate' |
48 | import { VideoInstance } from '../../../models/video/video-interface' | ||
49 | 48 | ||
50 | const videosRouter = express.Router() | 49 | const videosRouter = express.Router() |
51 | 50 | ||
@@ -195,7 +194,7 @@ function addVideo (req: express.Request, res: express.Response, videoPhysicalFil | |||
195 | .then(({ author, tagInstances, video }) => { | 194 | .then(({ author, tagInstances, video }) => { |
196 | const videoFileData = { | 195 | const videoFileData = { |
197 | extname: extname(videoPhysicalFile.filename), | 196 | extname: extname(videoPhysicalFile.filename), |
198 | resolution: 0, // TODO: improve readability, | 197 | resolution: VideoResolution.ORIGINAL, |
199 | size: videoPhysicalFile.size | 198 | size: videoPhysicalFile.size |
200 | } | 199 | } |
201 | 200 | ||
@@ -230,7 +229,7 @@ function addVideo (req: express.Request, res: express.Response, videoPhysicalFil | |||
230 | } | 229 | } |
231 | 230 | ||
232 | tasks.push( | 231 | tasks.push( |
233 | JobScheduler.Instance.createJob(t, 'videoTranscoder', dataInput) | 232 | JobScheduler.Instance.createJob(t, 'videoFileOptimizer', dataInput) |
234 | ) | 233 | ) |
235 | } | 234 | } |
236 | 235 | ||