diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/src/app/core/server/server.service.ts | 13 | ||||
-rw-r--r-- | client/src/app/shared/video/video-edit.model.ts | 2 | ||||
-rw-r--r-- | client/src/app/shared/video/video.model.ts | 2 |
3 files changed, 9 insertions, 8 deletions
diff --git a/client/src/app/core/server/server.service.ts b/client/src/app/core/server/server.service.ts index a8beb242d..a71c6d0bf 100644 --- a/client/src/app/core/server/server.service.ts +++ b/client/src/app/core/server/server.service.ts | |||
@@ -6,6 +6,7 @@ import { ReplaySubject } from 'rxjs/ReplaySubject' | |||
6 | import { ServerConfig } from '../../../../../shared' | 6 | import { ServerConfig } from '../../../../../shared' |
7 | import { About } from '../../../../../shared/models/server/about.model' | 7 | import { About } from '../../../../../shared/models/server/about.model' |
8 | import { environment } from '../../../environments/environment' | 8 | import { environment } from '../../../environments/environment' |
9 | import { VideoConstant, VideoPrivacy } from '../../../../../shared/models/videos' | ||
9 | 10 | ||
10 | @Injectable() | 11 | @Injectable() |
11 | export class ServerService { | 12 | export class ServerService { |
@@ -57,10 +58,10 @@ export class ServerService { | |||
57 | videoQuota: -1 | 58 | videoQuota: -1 |
58 | } | 59 | } |
59 | } | 60 | } |
60 | private videoCategories: Array<{ id: number, label: string }> = [] | 61 | private videoCategories: Array<VideoConstant<number>> = [] |
61 | private videoLicences: Array<{ id: number, label: string }> = [] | 62 | private videoLicences: Array<VideoConstant<number>> = [] |
62 | private videoLanguages: Array<{ id: number, label: string }> = [] | 63 | private videoLanguages: Array<VideoConstant<string>> = [] |
63 | private videoPrivacies: Array<{ id: number, label: string }> = [] | 64 | private videoPrivacies: Array<VideoConstant<VideoPrivacy>> = [] |
64 | 65 | ||
65 | constructor (private http: HttpClient) { | 66 | constructor (private http: HttpClient) { |
66 | this.loadConfigLocally() | 67 | this.loadConfigLocally() |
@@ -118,7 +119,7 @@ export class ServerService { | |||
118 | 119 | ||
119 | private loadVideoAttributeEnum ( | 120 | private loadVideoAttributeEnum ( |
120 | attributeName: 'categories' | 'licences' | 'languages' | 'privacies', | 121 | attributeName: 'categories' | 'licences' | 'languages' | 'privacies', |
121 | hashToPopulate: { id: number, label: string }[], | 122 | hashToPopulate: VideoConstant<number | string>[], |
122 | notifier: ReplaySubject<boolean>, | 123 | notifier: ReplaySubject<boolean>, |
123 | sort = false | 124 | sort = false |
124 | ) { | 125 | ) { |
@@ -127,7 +128,7 @@ export class ServerService { | |||
127 | Object.keys(data) | 128 | Object.keys(data) |
128 | .forEach(dataKey => { | 129 | .forEach(dataKey => { |
129 | hashToPopulate.push({ | 130 | hashToPopulate.push({ |
130 | id: parseInt(dataKey, 10), | 131 | id: dataKey, |
131 | label: data[dataKey] | 132 | label: data[dataKey] |
132 | }) | 133 | }) |
133 | }) | 134 | }) |
diff --git a/client/src/app/shared/video/video-edit.model.ts b/client/src/app/shared/video/video-edit.model.ts index c1a70d1b3..39826d71e 100644 --- a/client/src/app/shared/video/video-edit.model.ts +++ b/client/src/app/shared/video/video-edit.model.ts | |||
@@ -4,7 +4,7 @@ import { VideoPrivacy } from '../../../../../shared/models/videos/video-privacy. | |||
4 | export class VideoEdit { | 4 | export class VideoEdit { |
5 | category: number | 5 | category: number |
6 | licence: number | 6 | licence: number |
7 | language: number | 7 | language: string |
8 | description: string | 8 | description: string |
9 | name: string | 9 | name: string |
10 | tags: string[] | 10 | tags: string[] |
diff --git a/client/src/app/shared/video/video.model.ts b/client/src/app/shared/video/video.model.ts index e25c172e0..a284c1688 100644 --- a/client/src/app/shared/video/video.model.ts +++ b/client/src/app/shared/video/video.model.ts | |||
@@ -13,7 +13,7 @@ export class Video implements VideoServerModel { | |||
13 | publishedAt: Date | 13 | publishedAt: Date |
14 | category: VideoConstant<number> | 14 | category: VideoConstant<number> |
15 | licence: VideoConstant<number> | 15 | licence: VideoConstant<number> |
16 | language: VideoConstant<number> | 16 | language: VideoConstant<string> |
17 | privacy: VideoConstant<VideoPrivacy> | 17 | privacy: VideoConstant<VideoPrivacy> |
18 | description: string | 18 | description: string |
19 | duration: number | 19 | duration: number |