diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-03-22 21:15:55 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-03-22 21:25:24 +0100 |
commit | 6e07c3de88791a0b342e0cc319590048117f9c2d (patch) | |
tree | 049f88d3f6d3ec0aeea09702a583deb86d6ef78f /server/tests/real-world/tools | |
parent | 2d7653dc8726185615bab66353c4e3fb8fbb5a5f (diff) | |
download | PeerTube-6e07c3de88791a0b342e0cc319590048117f9c2d.tar.gz PeerTube-6e07c3de88791a0b342e0cc319590048117f9c2d.tar.zst PeerTube-6e07c3de88791a0b342e0cc319590048117f9c2d.zip |
Add video category support
Diffstat (limited to 'server/tests/real-world/tools')
-rw-r--r-- | server/tests/real-world/tools/upload.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/server/tests/real-world/tools/upload.js b/server/tests/real-world/tools/upload.js index ba08028cf..49076ee2a 100644 --- a/server/tests/real-world/tools/upload.js +++ b/server/tests/real-world/tools/upload.js | |||
@@ -9,6 +9,7 @@ program | |||
9 | .option('-u, --url <url>', 'Server url') | 9 | .option('-u, --url <url>', 'Server url') |
10 | .option('-a, --access-token <token>', 'Access token') | 10 | .option('-a, --access-token <token>', 'Access token') |
11 | .option('-n, --name <name>', 'Video name') | 11 | .option('-n, --name <name>', 'Video name') |
12 | .option('-d, --category <category number>', 'Category number') | ||
12 | .option('-d, --description <description>', 'Video description') | 13 | .option('-d, --description <description>', 'Video description') |
13 | .option('-t, --tags <tags>', 'Video tags', list) | 14 | .option('-t, --tags <tags>', 'Video tags', list) |
14 | .option('-f, --file <file>', 'Video absolute file path') | 15 | .option('-f, --file <file>', 'Video absolute file path') |
@@ -18,6 +19,7 @@ if ( | |||
18 | !program.url || | 19 | !program.url || |
19 | !program.accessToken || | 20 | !program.accessToken || |
20 | !program.name || | 21 | !program.name || |
22 | !program.category || | ||
21 | !program.description || | 23 | !program.description || |
22 | !program.tags || | 24 | !program.tags || |
23 | !Array.isArray(program.tags) || | 25 | !Array.isArray(program.tags) || |
@@ -34,6 +36,7 @@ fs.access(program.file, fs.F_OK, function (err) { | |||
34 | program.url, | 36 | program.url, |
35 | program.accessToken, | 37 | program.accessToken, |
36 | program.name, | 38 | program.name, |
39 | program.category, | ||
37 | program.description, | 40 | program.description, |
38 | program.tags, | 41 | program.tags, |
39 | program.file | 42 | program.file |
@@ -46,10 +49,10 @@ function list (val) { | |||
46 | return val.split(',') | 49 | return val.split(',') |
47 | } | 50 | } |
48 | 51 | ||
49 | function upload (url, accessToken, name, description, tags, file) { | 52 | function upload (url, accessToken, name, category, description, tags, file) { |
50 | console.log('Uploading %s video...', program.name) | 53 | console.log('Uploading %s video...', program.name) |
51 | 54 | ||
52 | utils.uploadVideo(url, accessToken, name, description, tags, file, function (err) { | 55 | utils.uploadVideo(url, accessToken, name, category, description, tags, file, function (err) { |
53 | if (err) throw err | 56 | if (err) throw err |
54 | 57 | ||
55 | console.log('Video uploaded.') | 58 | console.log('Video uploaded.') |