From f6e6e57499558c96660e413dbf89742425ac93a3 Mon Sep 17 00:00:00 2001 From: Marvin Schenkel Date: Fri, 28 Nov 2025 19:23:06 +0100 Subject: [PATCH] Spotify Connect: Fix UI not updating when MA starts playing an item (#2705) --- music_assistant/providers/spotify_connect/__init__.py | 7 +++++++ 1 file changed, 7 insertions(+) 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 -- 2.34.1