diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-03-27 20:53:11 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-03-27 20:53:11 +0200 |
commit | 6f0c39e2de400685b7baf8340b9e132f2659365a (patch) | |
tree | b036c6ebf65ff4cb7f5649fc48a0b7201370bddd /server/tests/real-world | |
parent | 28974889281523eec5b00dd5596c67d99c5167e5 (diff) | |
download | PeerTube-6f0c39e2de400685b7baf8340b9e132f2659365a.tar.gz PeerTube-6f0c39e2de400685b7baf8340b9e132f2659365a.tar.zst PeerTube-6f0c39e2de400685b7baf8340b9e132f2659365a.zip |
Server: add licence video attribute
Diffstat (limited to 'server/tests/real-world')
-rw-r--r-- | server/tests/real-world/real-world.js | 1 | ||||
-rw-r--r-- | server/tests/real-world/tools/upload.js | 8 |
2 files changed, 7 insertions, 2 deletions
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) { | |||
205 | const videoAttributes = { | 205 | const videoAttributes = { |
206 | name: Date.now() + ' name', | 206 | name: Date.now() + ' name', |
207 | category: 4, | 207 | category: 4, |
208 | licence: 2, | ||
208 | description: Date.now() + ' description', | 209 | description: Date.now() + ' description', |
209 | tags: [ Date.now().toString().substring(0, 5) + 't1', Date.now().toString().substring(0, 5) + 't2' ], | 210 | tags: [ Date.now().toString().substring(0, 5) + 't1', Date.now().toString().substring(0, 5) + 't2' ], |
210 | fixture: 'video_short1.webm' | 211 | 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 | |||
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('-c, --category <category number>', 'Category number') |
13 | .option('-l, --licence <licence number>', 'Licence number') | ||
13 | .option('-d, --description <description>', 'Video description') | 14 | .option('-d, --description <description>', 'Video description') |
14 | .option('-t, --tags <tags>', 'Video tags', list) | 15 | .option('-t, --tags <tags>', 'Video tags', list) |
15 | .option('-f, --file <file>', 'Video absolute file path') | 16 | .option('-f, --file <file>', 'Video absolute file path') |
@@ -20,6 +21,7 @@ if ( | |||
20 | !program.accessToken || | 21 | !program.accessToken || |
21 | !program.name || | 22 | !program.name || |
22 | !program.category || | 23 | !program.category || |
24 | !program.licence || | ||
23 | !program.description || | 25 | !program.description || |
24 | !program.tags || | 26 | !program.tags || |
25 | !Array.isArray(program.tags) || | 27 | !Array.isArray(program.tags) || |
@@ -37,6 +39,7 @@ fs.access(program.file, fs.F_OK, function (err) { | |||
37 | program.accessToken, | 39 | program.accessToken, |
38 | program.name, | 40 | program.name, |
39 | program.category, | 41 | program.category, |
42 | program.licence, | ||
40 | program.description, | 43 | program.description, |
41 | program.tags, | 44 | program.tags, |
42 | program.file | 45 | program.file |
@@ -49,12 +52,13 @@ function list (val) { | |||
49 | return val.split(',') | 52 | return val.split(',') |
50 | } | 53 | } |
51 | 54 | ||
52 | function upload (url, accessToken, name, category, description, tags, fixture) { | 55 | function upload (url, accessToken, name, category, licence, description, tags, fixture) { |
53 | console.log('Uploading %s video...', program.name) | 56 | console.log('Uploading %s video...', program.name) |
54 | 57 | ||
55 | const videoAttributes = { | 58 | const videoAttributes = { |
56 | name, | 59 | name, |
57 | category, | 60 | category, |
61 | licence, | ||
58 | description, | 62 | description, |
59 | tags, | 63 | tags, |
60 | fixture | 64 | fixture |