From aa7438ee24f53e9d7872820c4ecc2ba18b577df3 Mon Sep 17 00:00:00 2001 From: Marcel van der Veldt Date: Wed, 25 Feb 2026 22:08:01 +0100 Subject: [PATCH] Sort list of players to sync with in syncgroup player config --- music_assistant/providers/sync_group/player.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/music_assistant/providers/sync_group/player.py b/music_assistant/providers/sync_group/player.py index a1985b0b..5f72942b 100644 --- a/music_assistant/providers/sync_group/player.py +++ b/music_assistant/providers/sync_group/player.py @@ -171,13 +171,16 @@ class SyncGroupPlayer(Player): "These members will always be part of the group and can never be unjoined " "from the group. ", required=False, # needed for dynamic members (which allows empty members list) - options=[ - ConfigValueOption(x.display_name, x.player_id) - for x in self.mass.players.all_players(True, False) - if x.type != PlayerType.GROUP - and PlayerFeature.SET_MEMBERS in x.state.supported_features - and x.state.can_group_with - ], + options=sorted( + [ + ConfigValueOption(x.display_name, x.player_id) + for x in self.mass.players.all_players(True, False) + if x.type != PlayerType.GROUP + and PlayerFeature.SET_MEMBERS in x.state.supported_features + and x.state.can_group_with + ], + key=lambda x: x.title, + ), ), ConfigEntry( key=CONF_DYNAMIC_GROUP_MEMBERS, -- 2.34.1