From: Marvin Schenkel Date: Fri, 28 Nov 2025 18:23:06 +0000 (+0100) Subject: Spotify Connect: Fix UI not updating when MA starts playing an item (#2705) X-Git-Url: https://git.kitaultman.com/?a=commitdiff_plain;h=f6e6e57499558c96660e413dbf89742425ac93a3;p=music-assistant-server.git Spotify Connect: Fix UI not updating when MA starts playing an item (#2705) --- diff --git a/music_assistant/providers/spotify_connect/__init__.py b/music_assistant/providers/spotify_connect/__init__.py index 1dcac43c..c81c0fd4 100644 --- a/music_assistant/providers/spotify_connect/__init__.py +++ b/music_assistant/providers/spotify_connect/__init__.py @@ -558,6 +558,13 @@ class SpotifyConnectProvider(PluginProvider): self._spotify_provider = None self._update_source_capabilities() + # handle paused event - clear in_use_by so UI shows correct active source + # this happens when MA starts playing while Spotify Connect was active + if event_name == "paused" and self._source_details.in_use_by: + self.logger.debug("Spotify Connect paused, releasing player %s", self.mass_player_id) + self._source_details.in_use_by = None + self.mass.players.trigger_player_update(self.mass_player_id) + # handle session connected event # this player has become the active spotify connect player # we need to start the playback