From: Marcel van der Veldt Date: Tue, 24 Feb 2026 18:44:22 +0000 (+0100) Subject: Fix access to actual (protocol)player from within get_queue_item_stream_with_smartfade X-Git-Url: https://git.kitaultman.com/?a=commitdiff_plain;h=47c9dddbc2a9a2f3dee29f26537a02c1cd81bfa2;p=music-assistant-server.git Fix access to actual (protocol)player from within get_queue_item_stream_with_smartfade --- diff --git a/music_assistant/controllers/streams/streams_controller.py b/music_assistant/controllers/streams/streams_controller.py index 9db387f5..05cc889c 100644 --- a/music_assistant/controllers/streams/streams_controller.py +++ b/music_assistant/controllers/streams/streams_controller.py @@ -532,6 +532,7 @@ class StreamsController(CoreController): # where the crossfade of the next track is present in the stream of # a single track. This only works if the player supports gapless playback! audio_input = self.get_queue_item_stream_with_smartfade( + player=player, queue_item=queue_item, pcm_format=pcm_format, smart_fades_mode=smart_fades_mode, @@ -1590,6 +1591,7 @@ class StreamsController(CoreController): @use_buffer(buffer_size=30, min_buffer_before_yield=2) async def get_queue_item_stream_with_smartfade( self, + player: Player, queue_item: QueueItem, pcm_format: AudioFormat, smart_fades_mode: SmartFadesMode = SmartFadesMode.SMART_CROSSFADE, @@ -1791,10 +1793,8 @@ class StreamsController(CoreController): queue.index_in_buffer = self.mass.player_queues.index_by_id( queue.queue_id, next_queue_item.queue_item_id ) - queue_player = self.mass.players.get_player(queue.queue_id) - assert queue_player is not None next_queue_item_pcm_format = await self._select_pcm_format( - player=queue_player, + player=player, streamdetails=next_queue_item.streamdetails, smartfades_enabled=True, )