Skip to content

Commit

Permalink
[autocfg] fix multiroom backwards compatiblity
Browse files Browse the repository at this point in the history
  • Loading branch information
bitkeeper committed Nov 9, 2021
1 parent 844099f commit a4b908d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions www/inc/autocfg.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,14 @@ function getDbParams($dbtable, $values, $prefix = '') {
'Multiroom',
['requires' => ['multiroom_tx'], 'handler' => setPlayerSession],
['requires' => ['multiroom_rx'], 'handler' => setPlayerSession],
['requires' => ['multiroom_tx_bfr', 'multiroom_tx_host', 'multiroom_tx_port', 'multiroom_tx_sample_rate', 'multiroom_tx_channels',
'multiroom_tx_frame_size', 'multiroom_tx_bitrate', 'multiroom_tx_rtprio', 'multiroom_tx_query_timeout',
'multiroom_rx_bfr', 'multiroom_rx_host', 'multiroom_rx_port', 'multiroom_rx_sample_rate', 'multiroom_rx_channels', 'multiroom_rx_jitter_bfr',
'multiroom_rx_frame_size', 'multiroom_rx_rtprio', 'multiroom_rx_alsa_output_mode', 'multiroom_rx_mastervol_opt_in', 'multiroom_initial_volume'],
'handler' => function($optionals) {
setDbParams('cfg_multiroom', $optionals, 'multiroom_');
}, 'custom_write' => function($optionals) {
return getDbParams('cfg_multiroom', $optionals, 'multiroom_');
['requires' => ['multiroom_tx_bfr', 'multiroom_tx_host', 'multiroom_tx_port', 'multiroom_tx_sample_rate', 'multiroom_tx_channels', 'multiroom_tx_frame_size', 'multiroom_tx_bitrate',
'multiroom_rx_bfr', 'multiroom_rx_host', 'multiroom_rx_port', 'multiroom_rx_jitter_bfr', 'multiroom_rx_sample_rate', 'multiroom_rx_channels', 'multiroom_initial_volume'],
'optionals' => ['multiroom_tx_rtprio', 'multiroom_tx_query_timeout', 'multiroom_rx_frame_size', 'multiroom_rx_rtprio', 'multiroom_rx_alsa_output_mode', 'multiroom_rx_mastervol_opt_in', 'multiroom_initial_volume'],
'handler' => function($values, $optionals) {
$mergedValues = array_merge($values, $optionals);
setDbParams('cfg_multiroom', $mergedValues, 'multiroom_');
}, 'custom_write' => function($values) {
return getDbParams('cfg_multiroom', $values, 'multiroom_');
}],

'MPD',
Expand Down

0 comments on commit a4b908d

Please sign in to comment.