Fix: Handle player_ids being None
authorMarvin Schenkel <marvinschenkel@gmail.com>
Tue, 23 Sep 2025 07:26:59 +0000 (09:26 +0200)
committerMarvin Schenkel <marvinschenkel@gmail.com>
Tue, 23 Sep 2025 07:26:59 +0000 (09:26 +0200)
music_assistant/providers/sonos/player.py

index 22db88beca50faeca8d7d5b886e0b7d7b5157acf..bdaa577e88503f2304a2bf34eb112a83b6adaa41 100644 (file)
@@ -494,7 +494,7 @@ class SonosPlayer(Player):
             # if airplay mode is enabled, we could possibly receive child player id's that are
             # not Sonos players, but AirPlay players. We redirect those.
             airplay_child_ids = [x for x in player_ids_to_add or [] if x.startswith("ap")]
-            player_ids_to_add = [x for x in player_ids_to_add if x not in airplay_child_ids]
+            player_ids_to_add = [x for x in player_ids_to_add or [] if x not in airplay_child_ids]
             if airplay_child_ids:
                 if (
                     airplay_player.active_source != self._attr_active_source