diff options
Diffstat (limited to 'shared/server-commands/videos')
-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 | }) { |