aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/videos.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/videos.js')
-rw-r--r--server/controllers/api/videos.js7
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
48router.get('/categories', listVideoCategories) 48router.get('/categories', listVideoCategories)
49router.get('/licences', listVideoLicences) 49router.get('/licences', listVideoLicences)
50router.get('/languages', listVideoLanguages)
50 51
51router.get('/abuse', 52router.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
125function listVideoLanguages (req, res, next) {
126 res.json(constants.VIDEO_LANGUAGES)
127}
128
124function rateVideoRetryWrapper (req, res, next) { 129function 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