aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/real-world/tools
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/real-world/tools')
-rw-r--r--server/tests/real-world/tools/upload.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/server/tests/real-world/tools/upload.js b/server/tests/real-world/tools/upload.js
index 7b97ebf0b..4b6dbe603 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('-x, --nsfw', 'Video is Not Safe For Work')
12 .option('-c, --category <category number>', 'Category number') 13 .option('-c, --category <category number>', 'Category number')
13 .option('-l, --licence <licence number>', 'Licence number') 14 .option('-l, --licence <licence number>', 'Licence number')
14 .option('-d, --description <description>', 'Video description') 15 .option('-d, --description <description>', 'Video description')
@@ -22,6 +23,7 @@ if (
22 !program.name || 23 !program.name ||
23 !program.category || 24 !program.category ||
24 !program.licence || 25 !program.licence ||
26 !program.nsfw ||
25 !program.description || 27 !program.description ||
26 !program.tags || 28 !program.tags ||
27 !Array.isArray(program.tags) || 29 !Array.isArray(program.tags) ||
@@ -40,6 +42,7 @@ fs.access(program.file, fs.F_OK, function (err) {
40 program.name, 42 program.name,
41 program.category, 43 program.category,
42 program.licence, 44 program.licence,
45 program.nsfw,
43 program.description, 46 program.description,
44 program.tags, 47 program.tags,
45 program.file 48 program.file
@@ -52,13 +55,14 @@ function list (val) {
52 return val.split(',') 55 return val.split(',')
53} 56}
54 57
55function upload (url, accessToken, name, category, licence, description, tags, fixture) { 58function upload (url, accessToken, name, category, licence, nsfw, description, tags, fixture) {
56 console.log('Uploading %s video...', program.name) 59 console.log('Uploading %s video...', program.name)
57 60
58 const videoAttributes = { 61 const videoAttributes = {
59 name, 62 name,
60 category, 63 category,
61 licence, 64 licence,
65 nsfw,
62 description, 66 description,
63 tags, 67 tags,
64 fixture 68 fixture