diff options
Diffstat (limited to 'server/controllers/api/videos.js')
-rw-r--r-- | server/controllers/api/videos.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/server/controllers/api/videos.js b/server/controllers/api/videos.js index 3d616e33d..5e9ff482f 100644 --- a/server/controllers/api/videos.js +++ b/server/controllers/api/videos.js | |||
@@ -47,6 +47,7 @@ const reqFiles = multer({ storage: storage }).fields([{ name: 'videofile', maxCo | |||
47 | 47 | ||
48 | router.get('/categories', listVideoCategories) | 48 | router.get('/categories', listVideoCategories) |
49 | router.get('/licences', listVideoLicences) | 49 | router.get('/licences', listVideoLicences) |
50 | router.get('/languages', listVideoLanguages) | ||
50 | 51 | ||
51 | router.get('/abuse', | 52 | router.get('/abuse', |
52 | oAuth.authenticate, | 53 | oAuth.authenticate, |
@@ -121,6 +122,10 @@ function listVideoLicences (req, res, next) { | |||
121 | res.json(constants.VIDEO_LICENCES) | 122 | res.json(constants.VIDEO_LICENCES) |
122 | } | 123 | } |
123 | 124 | ||
125 | function listVideoLanguages (req, res, next) { | ||
126 | res.json(constants.VIDEO_LANGUAGES) | ||
127 | } | ||
128 | |||
124 | function rateVideoRetryWrapper (req, res, next) { | 129 | function rateVideoRetryWrapper (req, res, next) { |
125 | const options = { | 130 | const options = { |
126 | arguments: [ req, res ], | 131 | arguments: [ req, res ], |
@@ -313,6 +318,7 @@ function addVideo (req, res, videoFile, finalCallback) { | |||
313 | extname: path.extname(videoFile.filename), | 318 | extname: path.extname(videoFile.filename), |
314 | category: videoInfos.category, | 319 | category: videoInfos.category, |
315 | licence: videoInfos.licence, | 320 | licence: videoInfos.licence, |
321 | language: videoInfos.language, | ||
316 | nsfw: videoInfos.nsfw, | 322 | nsfw: videoInfos.nsfw, |
317 | description: videoInfos.description, | 323 | description: videoInfos.description, |
318 | duration: videoFile.duration, | 324 | duration: videoFile.duration, |
@@ -429,6 +435,7 @@ function updateVideo (req, res, finalCallback) { | |||
429 | if (videoInfosToUpdate.name) videoInstance.set('name', videoInfosToUpdate.name) | 435 | if (videoInfosToUpdate.name) videoInstance.set('name', videoInfosToUpdate.name) |
430 | if (videoInfosToUpdate.category) videoInstance.set('category', videoInfosToUpdate.category) | 436 | if (videoInfosToUpdate.category) videoInstance.set('category', videoInfosToUpdate.category) |
431 | if (videoInfosToUpdate.licence) videoInstance.set('licence', videoInfosToUpdate.licence) | 437 | if (videoInfosToUpdate.licence) videoInstance.set('licence', videoInfosToUpdate.licence) |
438 | if (videoInfosToUpdate.language) videoInstance.set('language', videoInfosToUpdate.language) | ||
432 | if (videoInfosToUpdate.nsfw) videoInstance.set('nsfw', videoInfosToUpdate.nsfw) | 439 | if (videoInfosToUpdate.nsfw) videoInstance.set('nsfw', videoInfosToUpdate.nsfw) |
433 | if (videoInfosToUpdate.description) videoInstance.set('description', videoInfosToUpdate.description) | 440 | if (videoInfosToUpdate.description) videoInstance.set('description', videoInfosToUpdate.description) |
434 | 441 | ||