X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fvideo-channel%2Fvideo-channel.model.ts;h=2f4597343bb291a1c61d6b2740e64371c2038e51;hb=1ba471c55fdbf05ef2c10152b3e4b0c5d8da3213;hp=617d6d44d93b88b7427e6fa8a041f4e6dd059415;hpb=af75e2d8df92d5d602e11353536ec6804a25f16f;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/shared/video-channel/video-channel.model.ts b/client/src/app/shared/video-channel/video-channel.model.ts index 617d6d44d..2f4597343 100644 --- a/client/src/app/shared/video-channel/video-channel.model.ts +++ b/client/src/app/shared/video-channel/video-channel.model.ts @@ -9,9 +9,13 @@ export class VideoChannel extends Actor implements ServerVideoChannel { isLocal: boolean nameWithHost: string nameWithHostForced: string + ownerAccount?: Account ownerBy?: string ownerAvatarUrl?: string + + videosCount?: number + viewsPerDay?: ViewsPerDate[] constructor (hash: ServerVideoChannel) { @@ -24,6 +28,8 @@ export class VideoChannel extends Actor implements ServerVideoChannel { this.nameWithHost = Actor.CREATE_BY_STRING(this.name, this.host) this.nameWithHostForced = Actor.CREATE_BY_STRING(this.name, this.host, true) + this.videosCount = hash.videosCount + if (hash.viewsPerDay) { this.viewsPerDay = hash.viewsPerDay.map(v => ({ ...v, date: new Date(v.date) })) }