diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-02-26 19:59:51 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-02-26 20:01:26 +0100 |
commit | 05a9feaa48cea560abd9561434a3479ab1021643 (patch) | |
tree | c0a8705a4a05fb806d5cdad294b74b78e8985723 /client/src/app/videos/shared | |
parent | f282639b07deee1e35403bd86c46ea521fb4845e (diff) | |
download | PeerTube-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.ts | 5 |
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 | } |