VideoFile,
VideoChannel,
VideoResolution,
- UserRight
+ UserRight,
+ VideoPrivacy
} from '../../../../../shared'
export class VideoDetails extends Video implements VideoDetailsServerModel {
- author: string
+ account: string
by: string
createdAt: Date
updatedAt: Date
uuid: string
isLocal: boolean
name: string
- podHost: string
+ serverHost: string
tags: string[]
thumbnailPath: string
thumbnailUrl: string
likes: number
dislikes: number
nsfw: boolean
+ descriptionPath: string
files: VideoFile[]
channel: VideoChannel
+ privacy: VideoPrivacy
+ privacyLabel: string
constructor (hash: VideoDetailsServerModel) {
super(hash)
+ this.privacy = hash.privacy
+ this.privacyLabel = hash.privacyLabel
+ this.descriptionPath = hash.descriptionPath
this.files = hash.files
this.channel = hash.channel
}
}
isRemovableBy (user: AuthUser) {
- return user && this.isLocal === true && (this.author === user.username || user.hasRight(UserRight.REMOVE_ANY_VIDEO))
+ return user && this.isLocal === true && (this.account === user.username || user.hasRight(UserRight.REMOVE_ANY_VIDEO))
}
isBlackistableBy (user: AuthUser) {
}
isUpdatableBy (user: AuthUser) {
- return user && this.isLocal === true && user.username === this.author
+ return user && this.isLocal === true && user.username === this.account
}
}