aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-main/video/video.service.ts
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 /client/src/app/shared/shared-main/video/video.service.ts
parent3cfa817672657df18260ece5b354efa0f3b6e317 (diff)
downloadPeerTube-b46cf4b920984492df598c1b61179acfc7f6f22e.tar.gz
PeerTube-b46cf4b920984492df598c1b61179acfc7f6f22e.tar.zst
PeerTube-b46cf4b920984492df598c1b61179acfc7f6f22e.zip
Add ability to remove hls/webtorrent files
Diffstat (limited to 'client/src/app/shared/shared-main/video/video.service.ts')
-rw-r--r--client/src/app/shared/shared-main/video/video.service.ts9
1 files changed, 9 insertions, 0 deletions
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 {
299 ) 299 )
300 } 300 }
301 301
302 removeVideoFiles (videoIds: (number | string)[], type: 'hls' | 'webtorrent') {
303 return from(videoIds)
304 .pipe(
305 concatMap(id => this.authHttp.delete(VideoService.BASE_VIDEO_URL + '/' + id + '/' + type)),
306 toArray(),
307 catchError(err => this.restExtractor.handleError(err))
308 )
309 }
310
302 loadCompleteDescription (descriptionPath: string) { 311 loadCompleteDescription (descriptionPath: string) {
303 return this.authHttp 312 return this.authHttp
304 .get<{ description: string }>(environment.apiUrl + descriptionPath) 313 .get<{ description: string }>(environment.apiUrl + descriptionPath)