From 6f0c39e2de400685b7baf8340b9e132f2659365a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 27 Mar 2017 20:53:11 +0200 Subject: Server: add licence video attribute --- server/tests/real-world/real-world.js | 1 + server/tests/real-world/tools/upload.js | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'server/tests/real-world') diff --git a/server/tests/real-world/real-world.js b/server/tests/real-world/real-world.js index 32afeec68..7777768c8 100644 --- a/server/tests/real-world/real-world.js +++ b/server/tests/real-world/real-world.js @@ -205,6 +205,7 @@ function upload (servers, numServer, callback) { const videoAttributes = { name: Date.now() + ' name', category: 4, + licence: 2, description: Date.now() + ' description', tags: [ Date.now().toString().substring(0, 5) + 't1', Date.now().toString().substring(0, 5) + 't2' ], fixture: 'video_short1.webm' diff --git a/server/tests/real-world/tools/upload.js b/server/tests/real-world/tools/upload.js index 856251c7f..7b97ebf0b 100644 --- a/server/tests/real-world/tools/upload.js +++ b/server/tests/real-world/tools/upload.js @@ -9,7 +9,8 @@ program .option('-u, --url ', 'Server url') .option('-a, --access-token ', 'Access token') .option('-n, --name ', 'Video name') - .option('-d, --category ', 'Category number') + .option('-c, --category ', 'Category number') + .option('-l, --licence ', 'Licence number') .option('-d, --description ', 'Video description') .option('-t, --tags ', 'Video tags', list) .option('-f, --file ', 'Video absolute file path') @@ -20,6 +21,7 @@ if ( !program.accessToken || !program.name || !program.category || + !program.licence || !program.description || !program.tags || !Array.isArray(program.tags) || @@ -37,6 +39,7 @@ fs.access(program.file, fs.F_OK, function (err) { program.accessToken, program.name, program.category, + program.licence, program.description, program.tags, program.file @@ -49,12 +52,13 @@ function list (val) { return val.split(',') } -function upload (url, accessToken, name, category, description, tags, fixture) { +function upload (url, accessToken, name, category, licence, description, tags, fixture) { console.log('Uploading %s video...', program.name) const videoAttributes = { name, category, + licence, description, tags, fixture -- cgit v1.2.3