1 import { VideoChannel as ServerVideoChannel } from '../../../../../shared/models/videos'
2 import { Actor } from '../actor/actor.model'
3 import { Account } from '../../../../../shared/models/actors'
5 export class VideoChannel extends Actor implements ServerVideoChannel {
11 nameWithHostForced: string
12 ownerAccount?: Account
14 ownerAvatarUrl?: string
16 constructor (hash: ServerVideoChannel) {
19 this.displayName = hash.displayName
20 this.description = hash.description
21 this.support = hash.support
22 this.isLocal = hash.isLocal
23 this.nameWithHost = Actor.CREATE_BY_STRING(this.name, this.host)
24 this.nameWithHostForced = Actor.CREATE_BY_STRING(this.name, this.host, true)
26 if (hash.ownerAccount) {
27 this.ownerAccount = hash.ownerAccount
28 this.ownerBy = Actor.CREATE_BY_STRING(hash.ownerAccount.name, hash.ownerAccount.host)
29 this.ownerAvatarUrl = Actor.GET_ACTOR_AVATAR_URL(this.ownerAccount)