aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/server-commands
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-10-25 11:51:20 +0200
committerChocobozzz <me@florianbigard.com>2022-10-25 11:51:20 +0200
commit508c1b1e9f3b26752a961e945b7fa59b72b30827 (patch)
treea027845a959291dad787041396c2f9e30dc1af98 /shared/server-commands
parent849f0fd3b2d00056a2c6252230814d6c2e3e3919 (diff)
downloadPeerTube-508c1b1e9f3b26752a961e945b7fa59b72b30827.tar.gz
PeerTube-508c1b1e9f3b26752a961e945b7fa59b72b30827.tar.zst
PeerTube-508c1b1e9f3b26752a961e945b7fa59b72b30827.zip
Correctly cleanup files from object storage
Diffstat (limited to 'shared/server-commands')
-rw-r--r--shared/server-commands/videos/videos-command.ts19
1 files changed, 18 insertions, 1 deletions
diff --git a/shared/server-commands/videos/videos-command.ts b/shared/server-commands/videos/videos-command.ts
index 1d6cad351..590244484 100644
--- a/shared/server-commands/videos/videos-command.ts
+++ b/shared/server-commands/videos/videos-command.ts
@@ -4,7 +4,7 @@ import { expect } from 'chai'
4import { createReadStream, stat } from 'fs-extra' 4import { createReadStream, stat } from 'fs-extra'
5import got, { Response as GotResponse } from 'got' 5import got, { Response as GotResponse } from 'got'
6import validator from 'validator' 6import validator from 'validator'
7import { buildAbsoluteFixturePath, omit, pick, wait } from '@shared/core-utils' 7import { buildAbsoluteFixturePath, getAllPrivacies, omit, pick, wait } from '@shared/core-utils'
8import { buildUUID } from '@shared/extra-utils' 8import { buildUUID } from '@shared/extra-utils'
9import { 9import {
10 HttpStatusCode, 10 HttpStatusCode,
@@ -15,6 +15,7 @@ import {
15 VideoCreateResult, 15 VideoCreateResult,
16 VideoDetails, 16 VideoDetails,
17 VideoFileMetadata, 17 VideoFileMetadata,
18 VideoInclude,
18 VideoPrivacy, 19 VideoPrivacy,
19 VideosCommonQuery, 20 VideosCommonQuery,
20 VideoTranscodingCreate 21 VideoTranscodingCreate
@@ -234,6 +235,22 @@ export class VideosCommand extends AbstractCommand {
234 }) 235 })
235 } 236 }
236 237
238 listAllForAdmin (options: OverrideCommandOptions & VideosCommonQuery = {}) {
239 const include = VideoInclude.NOT_PUBLISHED_STATE | VideoInclude.BLACKLISTED | VideoInclude.BLOCKED_OWNER
240 const nsfw = 'both'
241 const privacyOneOf = getAllPrivacies()
242
243 return this.list({
244 ...options,
245
246 include,
247 nsfw,
248 privacyOneOf,
249
250 token: this.buildCommonRequestToken({ ...options, implicitToken: true })
251 })
252 }
253
237 listByAccount (options: OverrideCommandOptions & VideosCommonQuery & { 254 listByAccount (options: OverrideCommandOptions & VideosCommonQuery & {
238 handle: string 255 handle: string
239 }) { 256 }) {