aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2018-09-29 02:49:33 +0200
committerChocobozzz <me@florianbigard.com>2018-10-01 14:14:49 +0200
commit26b415176212b44ff6ce168cb00aeb93b10c0cb3 (patch)
tree180d36bb11f78d24c9358760c5e72e743d17a02a /server
parentc01cfce40b8d47f5ccb689dd128e51b589cbc610 (diff)
downloadPeerTube-26b415176212b44ff6ce168cb00aeb93b10c0cb3.tar.gz
PeerTube-26b415176212b44ff6ce168cb00aeb93b10c0cb3.tar.zst
PeerTube-26b415176212b44ff6ce168cb00aeb93b10c0cb3.zip
Define channelId property beforehand
Diffstat (limited to 'server')
-rw-r--r--server/tools/peertube-upload.ts7
1 files changed, 2 insertions, 5 deletions
diff --git a/server/tools/peertube-upload.ts b/server/tools/peertube-upload.ts
index 4034b7e38..6248fb47d 100644
--- a/server/tools/peertube-upload.ts
+++ b/server/tools/peertube-upload.ts
@@ -106,9 +106,10 @@ async function run () {
106 106
107 console.log('Uploading %s video...', program[ 'videoName' ]) 107 console.log('Uploading %s video...', program[ 'videoName' ])
108 108
109 let videoAttributes:any = { 109 const videoAttributes = {
110 name: program['videoName'], 110 name: program['videoName'],
111 category: program['category'], 111 category: program['category'],
112 channelId: program['channelId'],
112 licence: program['licence'], 113 licence: program['licence'],
113 language: program['language'], 114 language: program['language'],
114 nsfw: program['nsfw'], 115 nsfw: program['nsfw'],
@@ -123,10 +124,6 @@ async function run () {
123 support: undefined 124 support: undefined
124 } 125 }
125 126
126 if (program['channelId']) {
127 videoAttributes.channelId = program['channelId']
128 }
129
130 await uploadVideo(program[ 'url' ], accessToken, videoAttributes) 127 await uploadVideo(program[ 'url' ], accessToken, videoAttributes)
131 128
132 console.log(`Video ${program['videoName']} uploaded.`) 129 console.log(`Video ${program['videoName']} uploaded.`)