restore-stream.lua: Adjust style

This commit is contained in:
Ashok Sidipotu
2022-07-13 05:43:35 +05:30
committed by Julian Bouzas
parent 78c2e3167a
commit ebffbc9ca1

View File

@@ -280,7 +280,9 @@ function saveStream (node)
local stream_props = node.properties
rulesApplyProperties (stream_props)
if config_restore_props and stream_props ["state.restore-props"] ~= "false" then
if config_restore_props and stream_props ["state.restore-props"] ~= "false"
then
local key_base = formKeyBase (stream_props)
if not key_base then
return
@@ -302,10 +304,12 @@ function saveStream (node)
state_table [key_base .. ":mute"] = tostring (props.mute)
end
if props.channelVolumes then
state_table [key_base .. ":channelVolumes"] = serializeArray (props.channelVolumes)
state_table [key_base .. ":channelVolumes"] =
serializeArray (props.channelVolumes)
end
if props.channelMap then
state_table [key_base .. ":channelMap"] = serializeArray (props.channelMap)
state_table [key_base .. ":channelMap"] =
serializeArray (props.channelMap)
end
::skip_prop::
@@ -349,7 +353,8 @@ function restoreStream (node)
return
end
if config_restore_props and stream_props["state.restore-props"] ~= "false" then
if config_restore_props and stream_props["state.restore-props"] ~= "false"
then
local props = { "Spa:Pod:Object:Param:Props", "Props" }
local str = state_table [key_base .. ":volume"]