fix: MusicCast Pause (#2907)
authorFabian Munkes <105975993+fmunkes@users.noreply.github.com>
Fri, 2 Jan 2026 15:08:43 +0000 (16:08 +0100)
committerGitHub <noreply@github.com>
Fri, 2 Jan 2026 15:08:43 +0000 (16:08 +0100)
* let MA handle pause in MusicCast

* handle pause for MA control as stop

music_assistant/providers/musiccast/player.py

index d5037477a13e3662cb2e98c739b573d241b43c0f..76000e2f669456c6cc1e725d3de387f6960f12bc 100644 (file)
@@ -18,7 +18,6 @@ from music_assistant.models.player import Player
 from music_assistant.providers.musiccast.avt_helpers import (
     avt_get_media_info,
     avt_next,
-    avt_pause,
     avt_play,
     avt_previous,
     avt_set_url,
@@ -92,7 +91,7 @@ class MusicCastPlayer(Player):
         self._attr_supported_features = {
             PlayerFeature.VOLUME_SET,
             PlayerFeature.VOLUME_MUTE,
-            PlayerFeature.PAUSE,
+            PlayerFeature.PAUSE,  # for non MA control, see pause method
             PlayerFeature.POWER,
             PlayerFeature.SELECT_SOURCE,
             PlayerFeature.SET_MEMBERS,
@@ -469,7 +468,9 @@ class MusicCastPlayer(Player):
     async def pause(self) -> None:
         """Pause command."""
         if self.upnp_update_helper is not None and self.upnp_update_helper.controlled_by_mass:
-            await avt_pause(self.mass.http_session, self.physical_device)
+            # if we are controlled by MA, i.e. upnp, send a stop, since
+            # pause appears to be unreliable/ not working
+            await avt_stop(self.mass.http_session, self.physical_device)
         else:
             await self._cmd_run(self.zone_device.pause)