aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/shared
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-02-26 19:59:51 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-02-26 20:01:26 +0100
commit05a9feaa48cea560abd9561434a3479ab1021643 (patch)
treec0a8705a4a05fb806d5cdad294b74b78e8985723 /client/src/app/videos/shared
parentf282639b07deee1e35403bd86c46ea521fb4845e (diff)
downloadPeerTube-05a9feaa48cea560abd9561434a3479ab1021643.tar.gz
PeerTube-05a9feaa48cea560abd9561434a3479ab1021643.tar.zst
PeerTube-05a9feaa48cea560abd9561434a3479ab1021643.zip
Client: add views information and sort
Diffstat (limited to 'client/src/app/videos/shared')
-rw-r--r--client/src/app/videos/shared/video.model.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/client/src/app/videos/shared/video.model.ts b/client/src/app/videos/shared/video.model.ts
index fae001d78..8e676708b 100644
--- a/client/src/app/videos/shared/video.model.ts
+++ b/client/src/app/videos/shared/video.model.ts
@@ -11,6 +11,7 @@ export class Video {
11 podHost: string; 11 podHost: string;
12 tags: string[]; 12 tags: string[];
13 thumbnailPath: string; 13 thumbnailPath: string;
14 views: number;
14 15
15 private static createByString(author: string, podHost: string) { 16 private static createByString(author: string, podHost: string) {
16 return author + '@' + podHost; 17 return author + '@' + podHost;
@@ -36,7 +37,8 @@ export class Video {
36 name: string, 37 name: string,
37 podHost: string, 38 podHost: string,
38 tags: string[], 39 tags: string[],
39 thumbnailPath: string 40 thumbnailPath: string,
41 views: number
40 }) { 42 }) {
41 this.author = hash.author; 43 this.author = hash.author;
42 this.createdAt = new Date(hash.createdAt); 44 this.createdAt = new Date(hash.createdAt);
@@ -49,6 +51,7 @@ export class Video {
49 this.podHost = hash.podHost; 51 this.podHost = hash.podHost;
50 this.tags = hash.tags; 52 this.tags = hash.tags;
51 this.thumbnailPath = hash.thumbnailPath; 53 this.thumbnailPath = hash.thumbnailPath;
54 this.views = hash.views;
52 55
53 this.by = Video.createByString(hash.author, hash.podHost); 56 this.by = Video.createByString(hash.author, hash.podHost);
54 } 57 }