From 02fa03b348559035efceccfa5145c4cff7a6c238 Mon Sep 17 00:00:00 2001 From: Julian Bouzas Date: Thu, 15 Jan 2026 12:22:12 -0500 Subject: [PATCH] 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. --- src/scripts/linking/rescan-media-role-links.lua | 2 ++ src/scripts/linking/rescan.lua | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/scripts/linking/rescan-media-role-links.lua b/src/scripts/linking/rescan-media-role-links.lua index f2747e73..14419c75 100644 --- a/src/scripts/linking/rescan-media-role-links.lua +++ b/src/scripts/linking/rescan-media-role-links.lua @@ -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 = { diff --git a/src/scripts/linking/rescan.lua b/src/scripts/linking/rescan.lua index db59d6a8..66367c3f 100644 --- a/src/scripts/linking/rescan.lua +++ b/src/scripts/linking/rescan.lua @@ -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)