From 3092476e64d09b449b4ad4f5198024afec1b22ca Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 7 Apr 2017 12:13:37 +0200 Subject: Server: add video language attribute --- server/tests/real-world/real-world.js | 3 ++- server/tests/real-world/tools/upload.js | 6 +++++- 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 ddce45cde..21f0732d0 100644 --- a/server/tests/real-world/real-world.js +++ b/server/tests/real-world/real-world.js @@ -21,7 +21,7 @@ program .option('-u, --update [weight]', 'Weight for updating videos') .option('-v, --view [weight]', 'Weight for viewing videos') .option('-l, --like [weight]', 'Weight for liking videos') - .option('-s --dislike [weight]', 'Weight for disliking videos') + .option('-s, --dislike [weight]', 'Weight for disliking videos') .option('-p, --pods [n]', 'Number of pods to run (3 or 6)', /^3|6$/, 3) .option('-a, --action [interval]', 'Interval in ms for an action') .option('-i, --integrity [interval]', 'Interval in ms for an integrity check') @@ -207,6 +207,7 @@ function upload (servers, numServer, callback) { category: 4, nsfw: false, licence: 2, + language: 1, 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 4b6dbe603..efb91e228 100644 --- a/server/tests/real-world/tools/upload.js +++ b/server/tests/real-world/tools/upload.js @@ -12,6 +12,7 @@ program .option('-x, --nsfw', 'Video is Not Safe For Work') .option('-c, --category ', 'Category number') .option('-l, --licence ', 'Licence number') + .option('-g, --language ', 'Language number') .option('-d, --description ', 'Video description') .option('-t, --tags ', 'Video tags', list) .option('-f, --file ', 'Video absolute file path') @@ -23,6 +24,7 @@ if ( !program.name || !program.category || !program.licence || + !program.language || !program.nsfw || !program.description || !program.tags || @@ -42,6 +44,7 @@ fs.access(program.file, fs.F_OK, function (err) { program.name, program.category, program.licence, + program.language, program.nsfw, program.description, program.tags, @@ -55,13 +58,14 @@ function list (val) { return val.split(',') } -function upload (url, accessToken, name, category, licence, nsfw, description, tags, fixture) { +function upload (url, accessToken, name, category, licence, language, nsfw, description, tags, fixture) { console.log('Uploading %s video...', program.name) const videoAttributes = { name, category, licence, + language, nsfw, description, tags, -- cgit v1.2.3