aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-main/video/video.model.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/shared-main/video/video.model.ts')
-rw-r--r--client/src/app/shared/shared-main/video/video.model.ts12
1 files changed, 12 insertions, 0 deletions
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 4203ff1c0..eefa90489 100644
--- a/client/src/app/shared/shared-main/video/video.model.ts
+++ b/client/src/app/shared/shared-main/video/video.model.ts
@@ -220,6 +220,18 @@ export class Video implements VideoServerModel {
220 return user && this.isLocal === true && (this.account.name === user.username || user.hasRight(UserRight.UPDATE_ANY_VIDEO)) 220 return user && this.isLocal === true && (this.account.name === user.username || user.hasRight(UserRight.UPDATE_ANY_VIDEO))
221 } 221 }
222 222
223 canRemoveFiles (user: AuthUser) {
224 return user.hasRight(UserRight.MANAGE_VIDEO_FILES) &&
225 this.state.id !== VideoState.TO_TRANSCODE &&
226 this.hasHLS() &&
227 this.hasWebTorrent()
228 }
229
230 canRunTranscoding (user: AuthUser) {
231 return user.hasRight(UserRight.RUN_VIDEO_TRANSCODING) &&
232 this.state.id !== VideoState.TO_TRANSCODE
233 }
234
223 hasHLS () { 235 hasHLS () {
224 return this.streamingPlaylists?.some(p => p.type === VideoStreamingPlaylistType.HLS) 236 return this.streamingPlaylists?.some(p => p.type === VideoStreamingPlaylistType.HLS)
225 } 237 }