diff options
author | Chocobozzz <me@florianbigard.com> | 2021-11-18 14:35:08 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-11-18 15:20:57 +0100 |
commit | ad5db1044c8599eaaaa2a578b350777ae996b068 (patch) | |
tree | 3e003cccf021152405d49b21c6c91b703c8ae96c /client/src/app/shared/shared-main/video/video.model.ts | |
parent | b46cf4b920984492df598c1b61179acfc7f6f22e (diff) | |
download | PeerTube-ad5db1044c8599eaaaa2a578b350777ae996b068.tar.gz PeerTube-ad5db1044c8599eaaaa2a578b350777ae996b068.tar.zst PeerTube-ad5db1044c8599eaaaa2a578b350777ae996b068.zip |
Add ability to run transcoding jobs
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.ts | 12 |
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 | } |