1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 19:42:24 +02:00

Correctly cleanup files from object storage

This commit is contained in:
Chocobozzz 2022-10-25 11:51:20 +02:00
parent 849f0fd3b2
commit 508c1b1e9f
No known key found for this signature in database
GPG key ID: 583A612D890159BE
4 changed files with 42 additions and 19 deletions

View file

@ -4,7 +4,7 @@ import { expect } from 'chai'
import { createReadStream, stat } from 'fs-extra'
import got, { Response as GotResponse } from 'got'
import validator from 'validator'
import { buildAbsoluteFixturePath, omit, pick, wait } from '@shared/core-utils'
import { buildAbsoluteFixturePath, getAllPrivacies, omit, pick, wait } from '@shared/core-utils'
import { buildUUID } from '@shared/extra-utils'
import {
HttpStatusCode,
@ -15,6 +15,7 @@ import {
VideoCreateResult,
VideoDetails,
VideoFileMetadata,
VideoInclude,
VideoPrivacy,
VideosCommonQuery,
VideoTranscodingCreate
@ -234,6 +235,22 @@ export class VideosCommand extends AbstractCommand {
})
}
listAllForAdmin (options: OverrideCommandOptions & VideosCommonQuery = {}) {
const include = VideoInclude.NOT_PUBLISHED_STATE | VideoInclude.BLACKLISTED | VideoInclude.BLOCKED_OWNER
const nsfw = 'both'
const privacyOneOf = getAllPrivacies()
return this.list({
...options,
include,
nsfw,
privacyOneOf,
token: this.buildCommonRequestToken({ ...options, implicitToken: true })
})
}
listByAccount (options: OverrideCommandOptions & VideosCommonQuery & {
handle: string
}) {