Fix privacy argument in upload script
authorChocobozzz <me@florianbigard.com>
Wed, 4 Apr 2018 08:47:02 +0000 (10:47 +0200)
committerChocobozzz <me@florianbigard.com>
Wed, 4 Apr 2018 08:47:02 +0000 (10:47 +0200)
server/tools/import-videos.ts
server/tools/upload.ts

index 2f38ea7c77e9f079db666035fd5cafe365f80b71..e6272a433cfd988a31886774bbec1e62d58e4428 100644 (file)
@@ -76,6 +76,7 @@ async function run () {
       await processVideo(info, program['language'])
     }
 
+    // https://www.youtube.com/watch?v=2Upx39TBc1s
     console.log('I\'m finished!')
     process.exit(0)
   })
index e835e61f6b00979df79196a8e197c32b69232c03..765e9618a99fbdd4bad401950a0488443fee7d45 100644 (file)
@@ -4,6 +4,7 @@ import { isAbsolute } from 'path'
 import { promisify } from 'util'
 import { getClient, login } from '../tests/utils'
 import { uploadVideo } from '../tests/utils/index'
+import { VideoPrivacy } from '../../shared/models/videos'
 
 const accessPromise = promisify(access)
 
@@ -27,6 +28,7 @@ program
 
 if (!program['tags']) program['tags'] = []
 if (!program['nsfw']) program['nsfw'] = false
+if (!program['privacy']) program['privacy'] = VideoPrivacy.PUBLIC
 if (!program['commentsEnabled']) program['commentsEnabled'] = false
 
 if (