linking: Make sure we don't handle metadata collections

Since collections are also metadata objects, this avoids possible conflics if
some collection metadatas have matching names.
This commit is contained in:
Julian Bouzas 2026-01-15 12:22:12 -05:00
parent 76d9b102f2
commit 02fa03b348
2 changed files with 5 additions and 0 deletions

View file

@ -68,6 +68,7 @@ function getSuspendPlaybackFromMetadata (om)
local metadata = om:lookup {
type = "metadata",
Constraint { "metadata.name", "=", "default" },
Constraint { "wireplumber.collection", "-" },
}
if metadata then
local value = metadata:find(0, "suspend.playback")
@ -92,6 +93,7 @@ AsyncEventHook {
Constraint { "event.type", "=", "metadata-changed" },
Constraint { "metadata.name", "=", "default" },
Constraint { "event.subject.key", "=", "suspend.playback" },
Constraint { "wireplumber.collection", "-" },
}
},
steps = {

View file

@ -229,11 +229,13 @@ SimpleEventHook {
Constraint { "metadata.name", "=", "default" },
Constraint { "event.subject.key", "c", "default.audio.source",
"default.audio.sink", "default.video.source" },
Constraint { "wireplumber.collection", "-" },
},
-- on any "filters" metadata changed
EventInterest {
Constraint { "event.type", "=", "metadata-changed" },
Constraint { "metadata.name", "=", "filters" },
Constraint { "wireplumber.collection", "-" },
},
},
execute = function (event)
@ -307,6 +309,7 @@ function handleMoveSetting (enable)
Constraint { "event.type", "=", "metadata-changed" },
Constraint { "metadata.name", "=", "default" },
Constraint { "event.subject.key", "c", "target.object", "target.node" },
Constraint { "wireplumber.collection", "-" },
},
},
execute = function (event)