diff options
author | Chocobozzz <me@florianbigard.com> | 2022-10-25 11:51:20 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-10-25 11:51:20 +0200 |
commit | 508c1b1e9f3b26752a961e945b7fa59b72b30827 (patch) | |
tree | a027845a959291dad787041396c2f9e30dc1af98 /shared/server-commands/videos/videos-command.ts | |
parent | 849f0fd3b2d00056a2c6252230814d6c2e3e3919 (diff) | |
download | PeerTube-508c1b1e9f3b26752a961e945b7fa59b72b30827.tar.gz PeerTube-508c1b1e9f3b26752a961e945b7fa59b72b30827.tar.zst PeerTube-508c1b1e9f3b26752a961e945b7fa59b72b30827.zip |
Correctly cleanup files from object storage
Diffstat (limited to 'shared/server-commands/videos/videos-command.ts')
-rw-r--r-- | shared/server-commands/videos/videos-command.ts | 19 |
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' | |||
4 | import { createReadStream, stat } from 'fs-extra' | 4 | import { createReadStream, stat } from 'fs-extra' |
5 | import got, { Response as GotResponse } from 'got' | 5 | import got, { Response as GotResponse } from 'got' |
6 | import validator from 'validator' | 6 | import validator from 'validator' |
7 | import { buildAbsoluteFixturePath, omit, pick, wait } from '@shared/core-utils' | 7 | import { buildAbsoluteFixturePath, getAllPrivacies, omit, pick, wait } from '@shared/core-utils' |
8 | import { buildUUID } from '@shared/extra-utils' | 8 | import { buildUUID } from '@shared/extra-utils' |
9 | import { | 9 | import { |
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 | }) { |