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.model.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'client/src/app/shared/shared-main/video/video.model.ts') diff --git a/client/src/app/shared/shared-main/video/video.model.ts b/client/src/app/shared/shared-main/video/video.model.ts index 472a8c810..4203ff1c0 100644 --- a/client/src/app/shared/shared-main/video/video.model.ts +++ b/client/src/app/shared/shared-main/video/video.model.ts @@ -14,7 +14,8 @@ import { VideoPrivacy, VideoScheduleUpdate, VideoState, - VideoStreamingPlaylist + VideoStreamingPlaylist, + VideoStreamingPlaylistType } from '@shared/models' export class Video implements VideoServerModel { @@ -219,6 +220,14 @@ export class Video implements VideoServerModel { return user && this.isLocal === true && (this.account.name === user.username || user.hasRight(UserRight.UPDATE_ANY_VIDEO)) } + hasHLS () { + return this.streamingPlaylists?.some(p => p.type === VideoStreamingPlaylistType.HLS) + } + + hasWebTorrent () { + return this.files && this.files.length !== 0 + } + isLiveInfoAvailableBy (user: AuthUser) { return this.isLive && user && this.isLocal === true && (this.account.name === user.username || user.hasRight(UserRight.GET_ANY_LIVE)) -- cgit v1.2.3