aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/server-commands/videos
diff options
context:
space:
mode:
Diffstat (limited to 'shared/server-commands/videos')
-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 }) {