From: Chocobozzz Date: Wed, 4 Apr 2018 08:47:02 +0000 (+0200) Subject: Fix privacy argument in upload script X-Git-Tag: v1.0.0-beta.4~83 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=72de91cb109b091fff607fbb0c6968bb8a1c97f3;p=github%2FChocobozzz%2FPeerTube.git Fix privacy argument in upload script --- diff --git a/server/tools/import-videos.ts b/server/tools/import-videos.ts index 2f38ea7c7..e6272a433 100644 --- a/server/tools/import-videos.ts +++ b/server/tools/import-videos.ts @@ -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) }) diff --git a/server/tools/upload.ts b/server/tools/upload.ts index e835e61f6..765e9618a 100644 --- a/server/tools/upload.ts +++ b/server/tools/upload.ts @@ -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 (