diff options
Diffstat (limited to 'shared')
-rw-r--r-- | shared/extra-utils/videos/videos-command.ts | 30 | ||||
-rw-r--r-- | shared/models/users/user-right.enum.ts | 4 |
2 files changed, 33 insertions, 1 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', |
diff --git a/shared/models/users/user-right.enum.ts b/shared/models/users/user-right.enum.ts index 950b22bad..96bccaf2f 100644 --- a/shared/models/users/user-right.enum.ts +++ b/shared/models/users/user-right.enum.ts | |||
@@ -38,5 +38,7 @@ export const enum UserRight { | |||
38 | 38 | ||
39 | MANAGE_PLUGINS, | 39 | MANAGE_PLUGINS, |
40 | 40 | ||
41 | MANAGE_VIDEOS_REDUNDANCIES | 41 | MANAGE_VIDEOS_REDUNDANCIES, |
42 | |||
43 | MANAGE_VIDEO_FILES | ||
42 | } | 44 | } |