]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tools/peertube-upload.ts
Add ability to forbid followers
[github/Chocobozzz/PeerTube.git] / server / tools / peertube-upload.ts
index 6248fb47d648f6cc1519f9892080991582e8b363..ebc62c96512ce6a6c2b7aaa65fe41130c3f9f980 100644 (file)
@@ -1,8 +1,8 @@
 import * as program from 'commander'
 import { access, constants } from 'fs-extra'
 import { isAbsolute } from 'path'
-import { getClient, login } from '../tests/utils'
-import { uploadVideo } from '../tests/utils/index'
+import { getClient, login } from '../../shared/utils'
+import { uploadVideo } from '../../shared/utils/'
 import { VideoPrivacy } from '../../shared/models/videos'
 import { netrc, getSettings } from './cli'
 
@@ -30,6 +30,7 @@ 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 (!program['downloadEnabled']) program['downloadEnabled'] = true
 
 getSettings()
   .then(settings => {
@@ -116,6 +117,7 @@ async function run () {
     description: program['videoDescription'],
     tags: program['tags'],
     commentsEnabled: program['commentsEnabled'],
+    downloadEnabled: program['downloadEnabled'],
     fixture: program['file'],
     thumbnailfile: program['thumbnail'],
     previewfile: program['preview'],