node/software-dsp: do not hide target node when hide-parent is false

The existence of props["hide-parent"] is truthy. Parse the boolean explicitly
to get the correct logic.

Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
This commit is contained in:
James Calligeros
2024-03-29 15:34:44 +10:00
parent b45eafa53c
commit 2a45842169

View File

@@ -6,6 +6,7 @@
-- SPDX-License-Identifier: MIT -- SPDX-License-Identifier: MIT
log = Log.open_topic("s-node") log = Log.open_topic("s-node")
cutils = require ("common-utils")
config = {} config = {}
config.rules = Conf.get_section_as_json("node.software-dsp.rules", Json.Array{}) config.rules = Conf.get_section_as_json("node.software-dsp.rules", Json.Array{})
@@ -37,7 +38,7 @@ SimpleEventHook {
filter_nodes[node.properties["object.id"]] = LocalModule("libpipewire-module-filter-chain", props["filter-graph"], {}) filter_nodes[node.properties["object.id"]] = LocalModule("libpipewire-module-filter-chain", props["filter-graph"], {})
end end
if props["hide-parent"] then if cutils.parseBool (props["hide-parent"]) then
log:debug("Setting permissions to '-' on " .. node.properties["node.name"] .. " for open clients") log:debug("Setting permissions to '-' on " .. node.properties["node.name"] .. " for open clients")
for client in clients_om:iterate{ type = "client" } do for client in clients_om:iterate{ type = "client" } do
if not client["properties"]["wireplumber.daemon"] then if not client["properties"]["wireplumber.daemon"] then