aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/utils
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-02-09 16:47:06 +0100
committerChocobozzz <me@florianbigard.com>2018-02-09 16:47:06 +0100
commita7fea183f0f69104b209e7bfdd6435be28165f22 (patch)
treea0bfb7daf8e9778c664b8d7224b2e1c382e3834e /server/tests/utils
parent1185c246c591a0783dc0ab268bbd67eba1d46bb9 (diff)
downloadPeerTube-a7fea183f0f69104b209e7bfdd6435be28165f22.tar.gz
PeerTube-a7fea183f0f69104b209e7bfdd6435be28165f22.tar.zst
PeerTube-a7fea183f0f69104b209e7bfdd6435be28165f22.zip
Begin import script with youtube-dl
Diffstat (limited to 'server/tests/utils')
-rw-r--r--server/tests/utils/videos/videos.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/server/tests/utils/videos/videos.ts b/server/tests/utils/videos/videos.ts
index 0b28edd48..923ca48f1 100644
--- a/server/tests/utils/videos/videos.ts
+++ b/server/tests/utils/videos/videos.ts
@@ -249,8 +249,6 @@ async function uploadVideo (url: string, accessToken: string, videoAttributesArg
249 .set('Accept', 'application/json') 249 .set('Accept', 'application/json')
250 .set('Authorization', 'Bearer ' + accessToken) 250 .set('Authorization', 'Bearer ' + accessToken)
251 .field('name', attributes.name) 251 .field('name', attributes.name)
252 .field('category', attributes.category.toString())
253 .field('licence', attributes.licence.toString())
254 .field('nsfw', JSON.stringify(attributes.nsfw)) 252 .field('nsfw', JSON.stringify(attributes.nsfw))
255 .field('commentsEnabled', JSON.stringify(attributes.commentsEnabled)) 253 .field('commentsEnabled', JSON.stringify(attributes.commentsEnabled))
256 .field('description', attributes.description) 254 .field('description', attributes.description)
@@ -260,6 +258,12 @@ async function uploadVideo (url: string, accessToken: string, videoAttributesArg
260 if (attributes.language !== undefined) { 258 if (attributes.language !== undefined) {
261 req.field('language', attributes.language.toString()) 259 req.field('language', attributes.language.toString())
262 } 260 }
261 if (attributes.category !== undefined) {
262 req.field('category', attributes.category.toString())
263 }
264 if (attributes.licence !== undefined) {
265 req.field('licence', attributes.licence.toString())
266 }
263 267
264 for (let i = 0; i < attributes.tags.length; i++) { 268 for (let i = 0; i < attributes.tags.length; i++) {
265 req.field('tags[' + i + ']', attributes.tags[i]) 269 req.field('tags[' + i + ']', attributes.tags[i])