diff --git a/music_assistant/controllers/player_queues.py b/music_assistant/controllers/player_queues.py index 2401abbcc..5b84227ca 100644 --- a/music_assistant/controllers/player_queues.py +++ b/music_assistant/controllers/player_queues.py @@ -1048,7 +1048,9 @@ def on_player_update( else None, "image_url": self.mass.metadata.get_image_url( prev_item.media_item.image, size=512 - ), + ) + if prev_item.media_item.image + else None, "duration": getattr(prev_item.media_item, "duration", 0), "mbid": getattr(prev_item.media_item, "mbid", None), }, diff --git a/music_assistant/helpers/audio.py b/music_assistant/helpers/audio.py index 85aa5afe2..0534b144e 100644 --- a/music_assistant/helpers/audio.py +++ b/music_assistant/helpers/audio.py @@ -325,8 +325,8 @@ async def get_media_stream( async for chunk in TimedAsyncGenerator( ffmpeg_proc.iter_chunked(pcm_format.pcm_sample_size), timeout=30 ): - # for radio streams we just yield all chunks directly - if streamdetails.media_type == MediaType.RADIO: + # for non-tracks we just yield all chunks directly + if streamdetails.media_type != MediaType.TRACK: yield chunk bytes_sent += len(chunk) continue