aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/shared
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-06-11 11:02:35 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-06-11 11:02:35 +0200
commit69f616ab3aeefd6ce330600604df90f2f48bfe3b (patch)
tree1b40d6005e645d97a7db9784f32cd90b156528fa /client/src/app/videos/shared
parent75fb0c0b2efe7fb952d45d2bf111e9594f7d5b42 (diff)
downloadPeerTube-69f616ab3aeefd6ce330600604df90f2f48bfe3b.tar.gz
PeerTube-69f616ab3aeefd6ce330600604df90f2f48bfe3b.tar.zst
PeerTube-69f616ab3aeefd6ce330600604df90f2f48bfe3b.zip
Use shared models
Diffstat (limited to 'client/src/app/videos/shared')
-rw-r--r--client/src/app/videos/shared/video.model.ts21
1 files changed, 12 insertions, 9 deletions
diff --git a/client/src/app/videos/shared/video.model.ts b/client/src/app/videos/shared/video.model.ts
index fafdb4ac4..0cf4039df 100644
--- a/client/src/app/videos/shared/video.model.ts
+++ b/client/src/app/videos/shared/video.model.ts
@@ -1,17 +1,19 @@
1import { Video as VideoServerModel } from '../../../../../shared';
1import { User } from '../../shared'; 2import { User } from '../../shared';
2 3
3export class Video { 4export class Video implements VideoServerModel {
4 author: string; 5 author: string;
5 by: string; 6 by: string;
6 createdAt: Date; 7 createdAt: Date;
7 categoryLabel: string; 8 categoryLabel: string;
8 category: string; 9 category: number;
9 licenceLabel: string; 10 licenceLabel: string;
10 licence: string; 11 licence: number;
11 languageLabel: string; 12 languageLabel: string;
12 language: string; 13 language: number;
13 description: string; 14 description: string;
14 duration: string; 15 duration: number;
16 durationLabel: string;
15 id: string; 17 id: string;
16 isLocal: boolean; 18 isLocal: boolean;
17 magnetUri: string; 19 magnetUri: string;
@@ -41,11 +43,11 @@ export class Video {
41 author: string, 43 author: string,
42 createdAt: string, 44 createdAt: string,
43 categoryLabel: string, 45 categoryLabel: string,
44 category: string, 46 category: number,
45 licenceLabel: string, 47 licenceLabel: string,
46 licence: string, 48 licence: number,
47 languageLabel: string; 49 languageLabel: string;
48 language: string; 50 language: number;
49 description: string, 51 description: string,
50 duration: number; 52 duration: number;
51 id: string, 53 id: string,
@@ -69,7 +71,8 @@ export class Video {
69 this.languageLabel = hash.languageLabel; 71 this.languageLabel = hash.languageLabel;
70 this.language = hash.language; 72 this.language = hash.language;
71 this.description = hash.description; 73 this.description = hash.description;
72 this.duration = Video.createDurationString(hash.duration); 74 this.duration = hash.duration;
75 this.durationLabel = Video.createDurationString(hash.duration);
73 this.id = hash.id; 76 this.id = hash.id;
74 this.isLocal = hash.isLocal; 77 this.isLocal = hash.isLocal;
75 this.magnetUri = hash.magnetUri; 78 this.magnetUri = hash.magnetUri;