Fix typo in active source property
authorMarcel van der Veldt <m.vanderveldt@outlook.com>
Wed, 5 Nov 2025 20:36:56 +0000 (21:36 +0100)
committerMarcel van der Veldt <m.vanderveldt@outlook.com>
Wed, 5 Nov 2025 20:36:56 +0000 (21:36 +0100)
music_assistant/models/player.py

index 484ae3f0f4f082290e6e221323b6e4ce616fb4d7..2a54514bceca68e62737cb00fc2622e328d589ab 100644 (file)
@@ -840,11 +840,14 @@ class Player(ABC):
         # if the player is grouped/synced, use the active source of the group/parent player
         if parent_player_id := (self.active_group or self.synced_to):
             if parent_player := self.mass.players.get(parent_player_id):
-                return parent_player._active_source
+                return parent_player.active_source
         for plugin_source in self.mass.players.get_plugin_sources():
             if plugin_source.in_use_by == self.player_id:
                 return plugin_source.id
-        if self.playback_state in (PlaybackState.PLAYING, PlaybackState.PAUSED):
+        if (
+            self.playback_state in (PlaybackState.PLAYING, PlaybackState.PAUSED)
+            and self._active_source
+        ):
             # active source as reported by the player itself
             # but only if playing/paused, otherwise we always prefer the MA source
             return self._active_source