licence: program['licence'] || undefined,
language: program['language'] || undefined,
nsfw: program['nsfw'] !== undefined ? program['nsfw'] : false,
- description: program['videoDescription'] || '',
+ description: program['videoDescription'] || undefined,
tags: program['tags'] || [],
commentsEnabled: program['commentsEnabled'] !== undefined ? program['commentsEnabled'] : true,
downloadEnabled: program['downloadEnabled'] !== undefined ? program['downloadEnabled'] : true,
console.log(`Video ${program['videoName']} uploaded.`)
process.exit(0)
} catch (err) {
- console.log('coucou')
console.error(require('util').inspect(err))
process.exit(-1)
}
.set('Accept', 'application/json')
.set('Authorization', 'Bearer ' + accessToken)
.field('name', attributes.name)
- .field('support', attributes.support)
.field('nsfw', JSON.stringify(attributes.nsfw))
.field('commentsEnabled', JSON.stringify(attributes.commentsEnabled))
.field('downloadEnabled', JSON.stringify(attributes.downloadEnabled))
.field('privacy', attributes.privacy.toString())
.field('channelId', attributes.channelId)
+ if (attributes.support !== undefined) {
+ req.field('support', attributes.support)
+ }
+
if (attributes.description !== undefined) {
req.field('description', attributes.description)
}