aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/server-commands/videos/videos-command.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-10-12 16:09:02 +0200
committerChocobozzz <chocobozzz@cpy.re>2022-10-24 14:48:24 +0200
commit3545e72c686ff1725bbdfd8d16d693e2f4aa75a3 (patch)
treee7f1d12ef5dae1e1142c3a8d0b681c1dbbb0de10 /shared/server-commands/videos/videos-command.ts
parent38a3ccc7f8ad0ea94362b58c732af7c387ab46be (diff)
downloadPeerTube-3545e72c686ff1725bbdfd8d16d693e2f4aa75a3.tar.gz
PeerTube-3545e72c686ff1725bbdfd8d16d693e2f4aa75a3.tar.zst
PeerTube-3545e72c686ff1725bbdfd8d16d693e2f4aa75a3.zip
Put private videos under a specific subdirectory
Diffstat (limited to 'shared/server-commands/videos/videos-command.ts')
-rw-r--r--shared/server-commands/videos/videos-command.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/shared/server-commands/videos/videos-command.ts b/shared/server-commands/videos/videos-command.ts
index 168391523..5ec3b6ba8 100644
--- a/shared/server-commands/videos/videos-command.ts
+++ b/shared/server-commands/videos/videos-command.ts
@@ -342,8 +342,9 @@ export class VideosCommand extends AbstractCommand {
342 async upload (options: OverrideCommandOptions & { 342 async upload (options: OverrideCommandOptions & {
343 attributes?: VideoEdit 343 attributes?: VideoEdit
344 mode?: 'legacy' | 'resumable' // default legacy 344 mode?: 'legacy' | 'resumable' // default legacy
345 waitTorrentGeneration?: boolean // default true
345 } = {}) { 346 } = {}) {
346 const { mode = 'legacy' } = options 347 const { mode = 'legacy', waitTorrentGeneration } = options
347 let defaultChannelId = 1 348 let defaultChannelId = 1
348 349
349 try { 350 try {
@@ -377,7 +378,7 @@ export class VideosCommand extends AbstractCommand {
377 378
378 // Wait torrent generation 379 // Wait torrent generation
379 const expectedStatus = this.buildExpectedStatus({ ...options, defaultExpectedStatus: HttpStatusCode.OK_200 }) 380 const expectedStatus = this.buildExpectedStatus({ ...options, defaultExpectedStatus: HttpStatusCode.OK_200 })
380 if (expectedStatus === HttpStatusCode.OK_200) { 381 if (expectedStatus === HttpStatusCode.OK_200 && waitTorrentGeneration) {
381 let video: VideoDetails 382 let video: VideoDetails
382 383
383 do { 384 do {
@@ -692,6 +693,7 @@ export class VideosCommand extends AbstractCommand {
692 'categoryOneOf', 693 'categoryOneOf',
693 'licenceOneOf', 694 'licenceOneOf',
694 'languageOneOf', 695 'languageOneOf',
696 'privacyOneOf',
695 'tagsOneOf', 697 'tagsOneOf',
696 'tagsAllOf', 698 'tagsAllOf',
697 'isLocal', 699 'isLocal',