-import { UserRight, VideoChannel, VideoDetails as VideoDetailsServerModel, VideoFile } from '../../../../../shared'
+import {
+ UserRight,
+ VideoChannel,
+ VideoConstant,
+ VideoDetails as VideoDetailsServerModel,
+ VideoFile,
+ VideoState
+} from '../../../../../shared'
import { AuthUser } from '../../core'
import { Video } from '../../shared/video/video.model'
import { Account } from '@app/shared/account/account.model'
account: Account
commentsEnabled: boolean
+ waitTranscoding: boolean
+ state: VideoConstant<VideoState>
+
likesPercent: number
dislikesPercent: number
}
isBlackistableBy (user: AuthUser) {
- return user && user.hasRight(UserRight.MANAGE_VIDEO_BLACKLIST) === true && this.isLocal === false
+ return this.blacklisted !== true && user && user.hasRight(UserRight.MANAGE_VIDEO_BLACKLIST) === true
+ }
+
+ isUnblacklistableBy (user: AuthUser) {
+ return this.blacklisted === true && user && user.hasRight(UserRight.MANAGE_VIDEO_BLACKLIST) === true
}
isUpdatableBy (user: AuthUser) {