X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fcore%2Fserver%2Fserver.service.ts;h=2f1ef1fc23e1f69d4ae7131b1c479209f03f8ed7;hb=8cd7faaa331f83903f0bbaead288661218e38bdb;hp=e7152efa0f8b17afcd352060aa6b715a321fec46;hpb=a94419a604f324305c9dbb607496a5bca9b63d04;p=github%2FChocobozzz%2FPeerTube.git 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' import { getCompleteLocale, ServerConfig } from '../../../../../shared' import { About } from '../../../../../shared/models/server/about.model' import { environment } from '../../../environments/environment' -import { VideoConstant } from '../../../../../shared/models/videos' +import { VideoConstant, VideoPrivacy } from '../../../../../shared/models/videos' import { isDefaultLocale, peertubeTranslate } from '../../../../../shared/models/i18n' import { getDevLocale, isOnDevLocale } from '@app/shared/i18n/i18n-utils' import { sortBy } from '@app/shared/misc/utils' @@ -82,10 +82,10 @@ export class ServerService { } } } - private videoCategories: Array> = [] - private videoLicences: Array> = [] + private videoCategories: Array> = [] + private videoLicences: Array> = [] private videoLanguages: Array> = [] - private videoPrivacies: Array> = [] + private videoPrivacies: Array> = [] constructor ( private http: HttpClient, @@ -147,7 +147,7 @@ export class ServerService { private loadVideoAttributeEnum ( attributeName: 'categories' | 'licences' | 'languages' | 'privacies', - hashToPopulate: VideoConstant[], + hashToPopulate: VideoConstant[], notifier: ReplaySubject, sort = false ) { @@ -164,7 +164,7 @@ export class ServerService { const label = data[ dataKey ] hashToPopulate.push({ - id: dataKey, + id: attributeName === 'languages' ? dataKey : parseInt(dataKey, 10), label: peertubeTranslate(label, translations) }) })