aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/shared/video.model.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/videos/shared/video.model.ts')
-rw-r--r--client/src/app/videos/shared/video.model.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/client/src/app/videos/shared/video.model.ts b/client/src/app/videos/shared/video.model.ts
index 8e676708b..3eef936eb 100644
--- a/client/src/app/videos/shared/video.model.ts
+++ b/client/src/app/videos/shared/video.model.ts
@@ -12,6 +12,8 @@ export class Video {
12 tags: string[]; 12 tags: string[];
13 thumbnailPath: string; 13 thumbnailPath: string;
14 views: number; 14 views: number;
15 likes: number;
16 dislikes: number;
15 17
16 private static createByString(author: string, podHost: string) { 18 private static createByString(author: string, podHost: string) {
17 return author + '@' + podHost; 19 return author + '@' + podHost;
@@ -38,7 +40,9 @@ export class Video {
38 podHost: string, 40 podHost: string,
39 tags: string[], 41 tags: string[],
40 thumbnailPath: string, 42 thumbnailPath: string,
41 views: number 43 views: number,
44 likes: number,
45 dislikes: number,
42 }) { 46 }) {
43 this.author = hash.author; 47 this.author = hash.author;
44 this.createdAt = new Date(hash.createdAt); 48 this.createdAt = new Date(hash.createdAt);
@@ -52,6 +56,8 @@ export class Video {
52 this.tags = hash.tags; 56 this.tags = hash.tags;
53 this.thumbnailPath = hash.thumbnailPath; 57 this.thumbnailPath = hash.thumbnailPath;
54 this.views = hash.views; 58 this.views = hash.views;
59 this.likes = hash.likes;
60 this.dislikes = hash.dislikes;
55 61
56 this.by = Video.createByString(hash.author, hash.podHost); 62 this.by = Video.createByString(hash.author, hash.podHost);
57 } 63 }