aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--server/tools/peertube-upload.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/server/tools/peertube-upload.ts b/server/tools/peertube-upload.ts
index 927564b14..4034b7e38 100644
--- a/server/tools/peertube-upload.ts
+++ b/server/tools/peertube-upload.ts
@@ -15,6 +15,7 @@ program
15 .option('-P, --privacy <privacy_number>', 'Privacy') 15 .option('-P, --privacy <privacy_number>', 'Privacy')
16 .option('-N, --nsfw', 'Video is Not Safe For Work') 16 .option('-N, --nsfw', 'Video is Not Safe For Work')
17 .option('-c, --category <category_number>', 'Category number') 17 .option('-c, --category <category_number>', 'Category number')
18 .option('-C, --channel-id <channel_id>', 'Channel ID')
18 .option('-m, --comments-enabled', 'Enable comments') 19 .option('-m, --comments-enabled', 'Enable comments')
19 .option('-l, --licence <licence_number>', 'Licence number') 20 .option('-l, --licence <licence_number>', 'Licence number')
20 .option('-L, --language <language_code>', 'Language ISO 639 code (fr or en...)') 21 .option('-L, --language <language_code>', 'Language ISO 639 code (fr or en...)')
@@ -105,7 +106,7 @@ async function run () {
105 106
106 console.log('Uploading %s video...', program[ 'videoName' ]) 107 console.log('Uploading %s video...', program[ 'videoName' ])
107 108
108 const videoAttributes = { 109 let videoAttributes:any = {
109 name: program['videoName'], 110 name: program['videoName'],
110 category: program['category'], 111 category: program['category'],
111 licence: program['licence'], 112 licence: program['licence'],
@@ -122,6 +123,10 @@ async function run () {
122 support: undefined 123 support: undefined
123 } 124 }
124 125
126 if (program['channelId']) {
127 videoAttributes.channelId = program['channelId']
128 }
129
125 await uploadVideo(program[ 'url' ], accessToken, videoAttributes) 130 await uploadVideo(program[ 'url' ], accessToken, videoAttributes)
126 131
127 console.log(`Video ${program['videoName']} uploaded.`) 132 console.log(`Video ${program['videoName']} uploaded.`)