diff options
Diffstat (limited to 'shared/extra-utils/videos')
-rw-r--r-- | shared/extra-utils/videos/videos-command.ts | 30 |
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', |