From b46cf4b920984492df598c1b61179acfc7f6f22e Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 17 Nov 2021 16:04:53 +0100 Subject: Add ability to remove hls/webtorrent files --- client/src/app/shared/shared-main/video/video.service.ts | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'client/src/app/shared/shared-main/video/video.service.ts') diff --git a/client/src/app/shared/shared-main/video/video.service.ts b/client/src/app/shared/shared-main/video/video.service.ts index 570e8e3be..d135a27dc 100644 --- a/client/src/app/shared/shared-main/video/video.service.ts +++ b/client/src/app/shared/shared-main/video/video.service.ts @@ -299,6 +299,15 @@ export class VideoService { ) } + removeVideoFiles (videoIds: (number | string)[], type: 'hls' | 'webtorrent') { + return from(videoIds) + .pipe( + concatMap(id => this.authHttp.delete(VideoService.BASE_VIDEO_URL + '/' + id + '/' + type)), + toArray(), + catchError(err => this.restExtractor.handleError(err)) + ) + } + loadCompleteDescription (descriptionPath: string) { return this.authHttp .get<{ description: string }>(environment.apiUrl + descriptionPath) -- cgit v1.2.3