From 9ee46c18f7180978c592f1f3d23c9e086b20d4aa Mon Sep 17 00:00:00 2001 From: Marcel van der Veldt Date: Wed, 25 Feb 2026 22:43:44 +0100 Subject: [PATCH] Prefer active output protocol first when grouping members --- .../controllers/players/protocol_linking.py | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/music_assistant/controllers/players/protocol_linking.py b/music_assistant/controllers/players/protocol_linking.py index 396eb3f8..ed183b2c 100644 --- a/music_assistant/controllers/players/protocol_linking.py +++ b/music_assistant/controllers/players/protocol_linking.py @@ -1205,8 +1205,8 @@ class ProtocolLinkingMixin: Selection priority when grouping: 1. Try child's preferred output protocol (from player settings) - 2. Try native grouping (if parent and child are compatible) - 3. Try parent's active output protocol (if any and child supports it) + 2. Try parent's active output protocol (if any and child supports it) + 3. Try native grouping (if parent and child are compatible) 4. Search for common protocol that supports set_members 5. Log warning if no option works @@ -1266,19 +1266,7 @@ class ProtocolLinkingMixin: ) continue - # Priority 2: Try native grouping - if self._can_use_native_grouping( - child_player, parent_player, parent_supports_native_grouping - ): - native_members.append(child_player_id) - self.logger.log( - VERBOSE_LOG_LEVEL, - "Using native grouping for %s", - child_player.state.name, - ) - continue - - # Priority 3: Try parent's active output protocol (if it supports SET_MEMBERS) + # Priority 2: Try parent's active output protocol (if it supports SET_MEMBERS) if parent_protocol_domain and parent_protocol_player: # Verify the active protocol supports SET_MEMBERS if PlayerFeature.SET_MEMBERS in parent_protocol_player.state.supported_features: @@ -1303,6 +1291,18 @@ class ProtocolLinkingMixin: parent_protocol_player = None parent_protocol_domain = None + # Priority 3: Try native grouping + if self._can_use_native_grouping( + child_player, parent_player, parent_supports_native_grouping + ): + native_members.append(child_player_id) + self.logger.log( + VERBOSE_LOG_LEVEL, + "Using native grouping for %s", + child_player.state.name, + ) + continue + # Priority 4: Search for common protocol that supports set_members parent_protocol, child_protocol = self._try_find_common_protocol( child_player, parent_player -- 2.34.1