From: Marcel van der Veldt Date: Sun, 2 Nov 2025 23:12:25 +0000 (+0100) Subject: One more fix for infinite recursion X-Git-Url: https://git.kitaultman.com/?a=commitdiff_plain;h=ca24e8c5d5d716fb9ee087bc8e0adb1b6c64cbe1;p=music-assistant-server.git One more fix for infinite recursion --- diff --git a/music_assistant/models/player.py b/music_assistant/models/player.py index 4b734d8d..f9b78276 100644 --- a/music_assistant/models/player.py +++ b/music_assistant/models/player.py @@ -902,10 +902,6 @@ class Player(ABC): This is a convenience property with the calculates current media based on any group memberships or source plugins that can be active. """ - # if the player is grouped/synced, use the current_media 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.current_media return self.__attr_current_media @cached_property @@ -1282,6 +1278,10 @@ class Player(ABC): def __calculate_current_media(self) -> PlayerMedia | None: """Calculate the current media for the player.""" + # if the player is grouped/synced, use the current_media 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.current_media # if a pluginsource is currently active, return those details if ( self.active_source