X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=client%2Fsrc%2Fapp%2F%2Badmin%2Fconfig%2Fedit-custom-config%2Fedit-custom-config.component.ts;h=055bae8516e306d88d8609c1d1b788cfbfe26195;hb=00aa1f0d9b9a976a102773cb520f2464ef5c7540;hp=c238a6c8183777d2529ad4c46681e26a265e55e8;hpb=a80e84f047dc3d2229f1c5df9f008298fafb85a0;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts index c238a6c81..055bae851 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts +++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts @@ -15,7 +15,7 @@ import { FormValidatorService } from '@app/shared/forms/form-validators/form-val export class EditCustomConfigComponent extends FormReactive implements OnInit { customConfig: CustomConfig - resolutions: string[] = [] + resolutions: { id: string, label: string }[] = [] transcodingThreadOptions: { label: string, value: number }[] = [] constructor ( @@ -30,11 +30,30 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit { super() this.resolutions = [ - this.i18n('240p'), - this.i18n('360p'), - this.i18n('480p'), - this.i18n('720p'), - this.i18n('1080p') + { + id: '240p', + label: this.i18n('240p') + }, + { + id: '360p', + label: this.i18n('360p') + }, + { + id: '480p', + label: this.i18n('480p') + }, + { + id: '720p', + label: this.i18n('720p') + }, + { + id: '1080p', + label: this.i18n('1080p') + }, + { + id: '2160p', + label: this.i18n('2160p') + } ] this.transcodingThreadOptions = [ @@ -140,8 +159,8 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit { } } for (const resolution of this.resolutions) { - defaultValues.transcoding.resolutions[resolution] = 'false' - formGroupData.transcoding.resolutions[resolution] = null + defaultValues.transcoding.resolutions[resolution.id] = 'false' + formGroupData.transcoding.resolutions[resolution.id] = null } this.buildForm(formGroupData)