@@ -4,8 +4,19 @@ define(["jQuery", "loading", "globalize", "dom"], function($, loading, globalize
4
4
function loadPage ( page , config , systemInfo ) {
5
5
Array . prototype . forEach . call ( page . querySelectorAll ( ".chkDecodeCodec" ) , function ( c ) {
6
6
c . checked = - 1 !== ( config . HardwareDecodingCodecs || [ ] ) . indexOf ( c . getAttribute ( "data-codec" ) )
7
- } ) , page . querySelector ( "#chkHardwareEncoding" ) . checked = config . EnableHardwareEncoding , $ ( "#selectVideoDecoder" , page ) . val ( config . HardwareAccelerationType ) , $ ( "#selectThreadCount" , page ) . val ( config . EncodingThreadCount ) , $ ( "#txtDownMixAudioBoost" , page ) . val ( config . DownMixAudioBoost ) , page . querySelector ( ".txtEncoderPath" ) . value = config . EncoderAppPath || "" , $ ( "#txtTranscodingTempPath" , page ) . val ( config . TranscodingTempPath || "" ) , $ ( "#txtVaapiDevice" , page ) . val ( config . VaapiDevice || "" ) , page . querySelector ( "#selectH264Preset" ) . value = config . H264Preset || "" , page . querySelector ( "#txtH264Crf" ) . value = config . H264Crf || "" , page . querySelector ( "#chkEnableSubtitleExtraction" ) . checked = config . EnableSubtitleExtraction || ! 1 , page . querySelector ( "#selectVideoDecoder" ) . dispatchEvent ( new CustomEvent ( "change" , {
8
- bubbles : ! 0
7
+ } ) ;
8
+ page . querySelector ( "#chkHardwareEncoding" ) . checked = config . EnableHardwareEncoding ;
9
+ $ ( "#selectVideoDecoder" , page ) . val ( config . HardwareAccelerationType ) ;
10
+ $ ( "#selectThreadCount" , page ) . val ( config . EncodingThreadCount ) ;
11
+ $ ( "#txtDownMixAudioBoost" , page ) . val ( config . DownMixAudioBoost ) ;
12
+ page . querySelector ( ".txtEncoderPath" ) . value = config . EncoderAppPathDisplay || "" ;
13
+ $ ( "#txtTranscodingTempPath" , page ) . val ( config . TranscodingTempPath || "" ) ;
14
+ $ ( "#txtVaapiDevice" , page ) . val ( config . VaapiDevice || "" ) ;
15
+ page . querySelector ( "#selectH264Preset" ) . value = config . H264Preset || "" ;
16
+ page . querySelector ( "#txtH264Crf" ) . value = config . H264Crf || "" ;
17
+ page . querySelector ( "#chkEnableSubtitleExtraction" ) . checked = config . EnableSubtitleExtraction || false ;
18
+ page . querySelector ( "#selectVideoDecoder" ) . dispatchEvent ( new CustomEvent ( "change" , {
19
+ bubbles : true
9
20
} ) ) , loading . hide ( )
10
21
}
11
22
@@ -90,8 +101,8 @@ define(["jQuery", "loading", "globalize", "dom"], function($, loading, globalize
90
101
var page = this ;
91
102
ApiClient . getNamedConfiguration ( "encoding" ) . then ( function ( config ) {
92
103
ApiClient . getSystemInfo ( ) . then ( function ( systemInfo ) {
93
- "External" == systemInfo . EncoderLocationType ? ( page . querySelector ( ".fldEncoderPath" ) . classList . add ( "hide" ) , page . querySelector ( ".txtEncoderPath" ) . removeAttribute ( "required" ) ) : ( page . querySelector ( ".fldEncoderPath" ) . classList . remove ( "hide" ) , page . querySelector ( ".txtEncoderPath" ) . setAttribute ( "required" , "required" ) ) , loadPage ( page , config , systemInfo )
104
+ loadPage ( page , config , systemInfo ) ;
94
105
} )
95
106
} )
96
107
} )
97
- } ) ;
108
+ } ) ;
0 commit comments