From: Marcel van der Veldt Date: Tue, 4 Nov 2025 22:14:04 +0000 (+0100) Subject: AirPlay: Issue the extra volume command on RAOP only X-Git-Url: https://git.kitaultman.com/?a=commitdiff_plain;h=2f172431359534e0ddea42af2c9fdbfd310556f1;p=music-assistant-server.git AirPlay: Issue the extra volume command on RAOP only --- diff --git a/music_assistant/providers/airplay/protocols/raop.py b/music_assistant/providers/airplay/protocols/raop.py index 18a50b98..91f91bfe 100644 --- a/music_assistant/providers/airplay/protocols/raop.py +++ b/music_assistant/providers/airplay/protocols/raop.py @@ -116,6 +116,10 @@ class RaopStream(AirPlayProtocol): # start reading the stderr of the cliraop process from another task self._cli_proc.attach_stderr_reader(self.mass.create_task(self._stderr_reader())) + # repeat sending the volume level to the player because some players seem + # to ignore it the first time + # https://github.com/music-assistant/support/issues/3330 + self.mass.call_later(1, self.send_cli_command(f"VOLUME={self.player.volume_level}\n")) async def start_pairing(self) -> None: """Start pairing process for this protocol (if supported).""" diff --git a/music_assistant/providers/airplay/stream_session.py b/music_assistant/providers/airplay/stream_session.py index 60ace8f4..65c6cf1d 100644 --- a/music_assistant/providers/airplay/stream_session.py +++ b/music_assistant/providers/airplay/stream_session.py @@ -383,10 +383,6 @@ class AirPlayStreamSession: # start the stream assert airplay_player.stream # for type checker await airplay_player.stream.start(start_ntp) - # repeat sending the volume level to the player because some players seem - # to ignore it the first time - # https://github.com/music-assistant/support/issues/3330 - await airplay_player.stream.send_cli_command(f"VOLUME={airplay_player.volume_level}\n") async def _start_client_ffmpeg(self, airplay_player: AirPlayPlayer) -> None: """Start or restart the player's ffmpeg stream."""