aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/core/server/server.service.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/core/server/server.service.ts')
-rw-r--r--client/src/app/core/server/server.service.ts13
1 files changed, 7 insertions, 6 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'
6import { ServerConfig } from '../../../../../shared' 6import { ServerConfig } from '../../../../../shared'
7import { About } from '../../../../../shared/models/server/about.model' 7import { About } from '../../../../../shared/models/server/about.model'
8import { environment } from '../../../environments/environment' 8import { environment } from '../../../environments/environment'
9import { VideoConstant, VideoPrivacy } from '../../../../../shared/models/videos'
9 10
10@Injectable() 11@Injectable()
11export class ServerService { 12export 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 })