aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/videos
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-11-17 16:04:53 +0100
committerChocobozzz <me@florianbigard.com>2021-11-18 09:04:30 +0100
commitb46cf4b920984492df598c1b61179acfc7f6f22e (patch)
tree21fda049c85be48ab3d37b537aafa98e94649ad7 /shared/extra-utils/videos
parent3cfa817672657df18260ece5b354efa0f3b6e317 (diff)
downloadPeerTube-b46cf4b920984492df598c1b61179acfc7f6f22e.tar.gz
PeerTube-b46cf4b920984492df598c1b61179acfc7f6f22e.tar.zst
PeerTube-b46cf4b920984492df598c1b61179acfc7f6f22e.zip
Add ability to remove hls/webtorrent files
Diffstat (limited to 'shared/extra-utils/videos')
-rw-r--r--shared/extra-utils/videos/videos-command.ts30
1 files changed, 30 insertions, 0 deletions
diff --git a/shared/extra-utils/videos/videos-command.ts b/shared/extra-utils/videos/videos-command.ts
index 167fae22d..13a7d0e1c 100644
--- a/shared/extra-utils/videos/videos-command.ts
+++ b/shared/extra-utils/videos/videos-command.ts
@@ -602,6 +602,36 @@ export class VideosCommand extends AbstractCommand {
602 602
603 // --------------------------------------------------------------------------- 603 // ---------------------------------------------------------------------------
604 604
605 removeHLSFiles (options: OverrideCommandOptions & {
606 videoId: number | string
607 }) {
608 const path = '/api/v1/videos/' + options.videoId + '/hls'
609
610 return this.deleteRequest({
611 ...options,
612
613 path,
614 implicitToken: true,
615 defaultExpectedStatus: HttpStatusCode.NO_CONTENT_204
616 })
617 }
618
619 removeWebTorrentFiles (options: OverrideCommandOptions & {
620 videoId: number | string
621 }) {
622 const path = '/api/v1/videos/' + options.videoId + '/webtorrent'
623
624 return this.deleteRequest({
625 ...options,
626
627 path,
628 implicitToken: true,
629 defaultExpectedStatus: HttpStatusCode.NO_CONTENT_204
630 })
631 }
632
633 // ---------------------------------------------------------------------------
634
605 private buildListQuery (options: VideosCommonQuery) { 635 private buildListQuery (options: VideosCommonQuery) {
606 return pick(options, [ 636 return pick(options, [
607 'start', 637 'start',