aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/real-world/tools
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-03-28 21:19:46 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-03-28 21:19:46 +0200
commit31b59b477459d4f26ed8ef089a0e5553fb6a332b (patch)
tree70de15dc172045d01ad45718f55c22d5ca43b354 /server/tests/real-world/tools
parentd07137b90b2b2b0c1e93a6f0e7bf8719b133027c (diff)
downloadPeerTube-31b59b477459d4f26ed8ef089a0e5553fb6a332b.tar.gz
PeerTube-31b59b477459d4f26ed8ef089a0e5553fb6a332b.tar.zst
PeerTube-31b59b477459d4f26ed8ef089a0e5553fb6a332b.zip
Server: add nsfw attribute
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