From 72de91cb109b091fff607fbb0c6968bb8a1c97f3 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 4 Apr 2018 10:47:02 +0200 Subject: [PATCH] Fix privacy argument in upload script --- server/tools/import-videos.ts | 1 + server/tools/upload.ts | 2 ++ 2 files changed, 3 insertions(+) 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 ( -- 2.25.1