aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts')
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts42
1 files changed, 19 insertions, 23 deletions
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 48fb86968..a9f72d7db 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
@@ -37,12 +37,9 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit, A
37 37
38 resolutions: { id: string, label: string, description?: string }[] = [] 38 resolutions: { id: string, label: string, description?: string }[] = []
39 liveResolutions: { id: string, label: string, description?: string }[] = [] 39 liveResolutions: { id: string, label: string, description?: string }[] = []
40 concurrencyOptions: number[] = []
41 transcodingThreadOptions: { label: string, value: number }[] = []
42 liveMaxDurationOptions: { label: string, value: number }[] = []
43 40
44 vodTranscodingProfileOptions: string[] = [] 41 transcodingThreadOptions: SelectOptionsItem[] = []
45 liveTranscodingProfileOptions: string[] = [] 42 liveMaxDurationOptions: SelectOptionsItem[] = []
46 43
47 languageItems: SelectOptionsItem[] = [] 44 languageItems: SelectOptionsItem[] = []
48 categoryItems: SelectOptionsItem[] = [] 45 categoryItems: SelectOptionsItem[] = []
@@ -99,23 +96,22 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit, A
99 this.liveResolutions = this.resolutions.filter(r => r.id !== '0p') 96 this.liveResolutions = this.resolutions.filter(r => r.id !== '0p')
100 97
101 this.transcodingThreadOptions = [ 98 this.transcodingThreadOptions = [
102 { value: 0, label: $localize`Auto (via ffmpeg)` }, 99 { id: 0, label: $localize`Auto (via ffmpeg)` },
103 { value: 1, label: '1' }, 100 { id: 1, label: '1' },
104 { value: 2, label: '2' }, 101 { id: 2, label: '2' },
105 { value: 4, label: '4' }, 102 { id: 4, label: '4' },
106 { value: 8, label: '8' } 103 { id: 8, label: '8' },
104 { id: 12, label: '12' },
105 { id: 16, label: '16' },
106 { id: 32, label: '32' }
107 ] 107 ]
108 this.concurrencyOptions = [ 1, 2, 3, 4, 5, 6 ]
109
110 this.vodTranscodingProfileOptions = [ 'default' ]
111 this.liveTranscodingProfileOptions = [ 'default' ]
112 108
113 this.liveMaxDurationOptions = [ 109 this.liveMaxDurationOptions = [
114 { value: -1, label: $localize`No limit` }, 110 { id: -1, label: $localize`No limit` },
115 { value: 1000 * 3600, label: $localize`1 hour` }, 111 { id: 1000 * 3600, label: $localize`1 hour` },
116 { value: 1000 * 3600 * 3, label: $localize`3 hours` }, 112 { id: 1000 * 3600 * 3, label: $localize`3 hours` },
117 { value: 1000 * 3600 * 5, label: $localize`5 hours` }, 113 { id: 1000 * 3600 * 5, label: $localize`5 hours` },
118 { value: 1000 * 3600 * 10, label: $localize`10 hours` } 114 { id: 1000 * 3600 * 10, label: $localize`10 hours` }
119 ] 115 ]
120 } 116 }
121 117
@@ -137,11 +133,11 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit, A
137 } 133 }
138 134
139 getAvailableTranscodingProfile (type: 'live' | 'vod') { 135 getAvailableTranscodingProfile (type: 'live' | 'vod') {
140 if (type === 'live') { 136 const profiles = type === 'live'
141 return this.serverConfig.live.transcoding.availableProfiles 137 ? this.serverConfig.live.transcoding.availableProfiles
142 } 138 : this.serverConfig.transcoding.availableProfiles
143 139
144 return this.serverConfig.transcoding.availableProfiles 140 return profiles.map(p => ({ id: p, label: p }))
145 } 141 }
146 142
147 getTotalTranscodingThreads () { 143 getTotalTranscodingThreads () {