diff options
Diffstat (limited to 'client/src/app/core/server/server.service.ts')
-rw-r--r-- | client/src/app/core/server/server.service.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/client/src/app/core/server/server.service.ts b/client/src/app/core/server/server.service.ts index e7152efa0..2f1ef1fc2 100644 --- a/client/src/app/core/server/server.service.ts +++ b/client/src/app/core/server/server.service.ts | |||
@@ -6,7 +6,7 @@ import { Observable, of, ReplaySubject } from 'rxjs' | |||
6 | import { getCompleteLocale, ServerConfig } from '../../../../../shared' | 6 | import { getCompleteLocale, 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 } from '../../../../../shared/models/videos' | 9 | import { VideoConstant, VideoPrivacy } from '../../../../../shared/models/videos' |
10 | import { isDefaultLocale, peertubeTranslate } from '../../../../../shared/models/i18n' | 10 | import { isDefaultLocale, peertubeTranslate } from '../../../../../shared/models/i18n' |
11 | import { getDevLocale, isOnDevLocale } from '@app/shared/i18n/i18n-utils' | 11 | import { getDevLocale, isOnDevLocale } from '@app/shared/i18n/i18n-utils' |
12 | import { sortBy } from '@app/shared/misc/utils' | 12 | import { sortBy } from '@app/shared/misc/utils' |
@@ -82,10 +82,10 @@ export class ServerService { | |||
82 | } | 82 | } |
83 | } | 83 | } |
84 | } | 84 | } |
85 | private videoCategories: Array<VideoConstant<string>> = [] | 85 | private videoCategories: Array<VideoConstant<number>> = [] |
86 | private videoLicences: Array<VideoConstant<string>> = [] | 86 | private videoLicences: Array<VideoConstant<number>> = [] |
87 | private videoLanguages: Array<VideoConstant<string>> = [] | 87 | private videoLanguages: Array<VideoConstant<string>> = [] |
88 | private videoPrivacies: Array<VideoConstant<string>> = [] | 88 | private videoPrivacies: Array<VideoConstant<VideoPrivacy>> = [] |
89 | 89 | ||
90 | constructor ( | 90 | constructor ( |
91 | private http: HttpClient, | 91 | private http: HttpClient, |
@@ -147,7 +147,7 @@ export class ServerService { | |||
147 | 147 | ||
148 | private loadVideoAttributeEnum ( | 148 | private loadVideoAttributeEnum ( |
149 | attributeName: 'categories' | 'licences' | 'languages' | 'privacies', | 149 | attributeName: 'categories' | 'licences' | 'languages' | 'privacies', |
150 | hashToPopulate: VideoConstant<string>[], | 150 | hashToPopulate: VideoConstant<string | number>[], |
151 | notifier: ReplaySubject<boolean>, | 151 | notifier: ReplaySubject<boolean>, |
152 | sort = false | 152 | sort = false |
153 | ) { | 153 | ) { |
@@ -164,7 +164,7 @@ export class ServerService { | |||
164 | const label = data[ dataKey ] | 164 | const label = data[ dataKey ] |
165 | 165 | ||
166 | hashToPopulate.push({ | 166 | hashToPopulate.push({ |
167 | id: dataKey, | 167 | id: attributeName === 'languages' ? dataKey : parseInt(dataKey, 10), |
168 | label: peertubeTranslate(label, translations) | 168 | label: peertubeTranslate(label, translations) |
169 | }) | 169 | }) |
170 | }) | 170 | }) |