Sort list of players to sync with in syncgroup player config
authorMarcel van der Veldt <m.vanderveldt@outlook.com>
Wed, 25 Feb 2026 21:08:01 +0000 (22:08 +0100)
committerMarcel van der Veldt <m.vanderveldt@outlook.com>
Wed, 25 Feb 2026 21:08:01 +0000 (22:08 +0100)
music_assistant/providers/sync_group/player.py

index a1985b0b0bdeb92c251237cd47f2ea5ff238d328..5f72942bffc318d9634894212d036a3f50528f29 100644 (file)
@@ -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,