]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tools/upload.ts
Smooth resolution change?
[github/Chocobozzz/PeerTube.git] / server / tools / upload.ts
index e835e61f6b00979df79196a8e197c32b69232c03..177d849f325b5ec1ce05d50d0d33a05e3a08765f 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)
 
@@ -17,7 +18,7 @@ program
   .option('-c, --category <category number>', 'Category number')
   .option('-m, --comments-enabled', 'Enable comments')
   .option('-l, --licence <licence number>', 'Licence number')
-  .option('-L, --language <language number>', 'Language number')
+  .option('-L, --language <language code>', 'Language ISO 639 code (fr or en...)')
   .option('-d, --video-description <description>', 'Video description')
   .option('-t, --tags <tags>', 'Video tags', list)
   .option('-b, --thumbnail <thumbnailPath>', 'Thumbnail path')
@@ -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 (