Skip to content

Commit

Permalink
Always reset sonos active session
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelveldt committed Oct 25, 2024
1 parent 823bf60 commit 16704be
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion music_assistant/server/providers/sonos/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,8 @@ async def play_media(
"accept play_media command, it is synced to another player."
)
raise PlayerCommandFailed(msg)

# for now always reset the active session
sonos_player.client.player.group.active_session_id = None
if airplay := sonos_player.get_linked_airplay_player(True):
# linked airplay player is active, redirect the command
self.logger.debug("Redirecting PLAY_MEDIA command to linked airplay player.")
Expand Down

0 comments on commit 16704be

Please sign in to comment.