import { VideoChannel } from '@app/shared/shared-main/video-channel/video-channel.model'
import { peertubeTranslate } from '@shared/core-utils/i18n'
import {
- Avatar,
+ ActorImage,
ServerConfig,
UserRight,
Video as VideoServerModel,
byVideoChannel: string
byAccount: string
- accountAvatarUrl: string
- videoChannelAvatarUrl: string
-
createdAt: Date
updatedAt: Date
publishedAt: Date
displayName: string
url: string
host: string
- avatar?: Avatar
+ avatar?: ActorImage
}
channel: {
displayName: string
url: string
host: string
- avatar?: Avatar
+ avatar?: ActorImage
}
userHistory?: {
this.byAccount = Actor.CREATE_BY_STRING(hash.account.name, hash.account.host)
this.byVideoChannel = Actor.CREATE_BY_STRING(hash.channel.name, hash.channel.host)
- this.accountAvatarUrl = Account.GET_ACTOR_AVATAR_URL(this.account)
- this.videoChannelAvatarUrl = VideoChannel.GET_ACTOR_AVATAR_URL(this.channel)
this.category.label = peertubeTranslate(this.category.label, translations)
this.licence.label = peertubeTranslate(this.licence.label, translations)
canBeDuplicatedBy (user: AuthUser) {
return user && this.isLocal === false && user.hasRight(UserRight.MANAGE_VIDEOS_REDUNDANCIES)
}
+
+ getExactNumberOfViews () {
+ if (this.views < 1000) return ''
+
+ if (this.isLive) {
+ return $localize`${this.views} viewers`
+ }
+
+ return $localize`${this.views} views`
+ }
}