X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fvideos%2Fshared%2Fvideo.model.ts;h=5ed622dce63757067c7d8c2c39ba40b675db32b2;hb=d07137b90b2b2b0c1e93a6f0e7bf8719b133027c;hp=fae001d78fa633ee6ca76a67fa47d9b194e3b5f8;hpb=feb4bdfd9b46e87aadfa7c0d5338cde887d1f58c;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/videos/shared/video.model.ts b/client/src/app/videos/shared/video.model.ts index fae001d78..5ed622dce 100644 --- a/client/src/app/videos/shared/video.model.ts +++ b/client/src/app/videos/shared/video.model.ts @@ -2,6 +2,8 @@ export class Video { author: string; by: string; createdAt: Date; + categoryLabel: string; + licenceLabel: string; description: string; duration: string; id: string; @@ -11,6 +13,9 @@ export class Video { podHost: string; tags: string[]; thumbnailPath: string; + views: number; + likes: number; + dislikes: number; private static createByString(author: string, podHost: string) { return author + '@' + podHost; @@ -28,6 +33,8 @@ export class Video { constructor(hash: { author: string, createdAt: string, + categoryLabel: string, + licenceLabel: string, description: string, duration: number; id: string, @@ -36,10 +43,15 @@ export class Video { name: string, podHost: string, tags: string[], - thumbnailPath: string + thumbnailPath: string, + views: number, + likes: number, + dislikes: number, }) { this.author = hash.author; this.createdAt = new Date(hash.createdAt); + this.categoryLabel = hash.categoryLabel; + this.licenceLabel = hash.licenceLabel; this.description = hash.description; this.duration = Video.createDurationString(hash.duration); this.id = hash.id; @@ -49,6 +61,9 @@ export class Video { this.podHost = hash.podHost; this.tags = hash.tags; this.thumbnailPath = hash.thumbnailPath; + this.views = hash.views; + this.likes = hash.likes; + this.dislikes = hash.dislikes; this.by = Video.createByString(hash.author, hash.podHost); }