From: Marvin Schenkel Date: Wed, 22 Mar 2023 16:20:16 +0000 (+0100) Subject: Escape didl image url and disable throttling. (#561) X-Git-Url: https://git.kitaultman.com/?a=commitdiff_plain;h=8357b9130f6db6b9f1b8f55e54e713799ec87706;p=music-assistant-server.git Escape didl image url and disable throttling. (#561) --- diff --git a/music_assistant/server/controllers/streams.py b/music_assistant/server/controllers/streams.py index a1d665c8..152321d2 100644 --- a/music_assistant/server/controllers/streams.py +++ b/music_assistant/server/controllers/streams.py @@ -421,13 +421,14 @@ class StreamsController: await resp.write(chunk) bytes_streamed += len(chunk) + # DISABLE FOR NOW TO AVOID ISSUES WITH SONOS ICW YOUTUBE MUSIC # do not allow the player to prebuffer more than 30 seconds - seconds_streamed = int(bytes_streamed / stream_job.pcm_sample_size) - if ( - seconds_streamed > 30 - and (seconds_streamed - player.corrected_elapsed_time) > 30 - ): - await asyncio.sleep(1) + # seconds_streamed = int(bytes_streamed / stream_job.pcm_sample_size) + # if ( + # seconds_streamed > 30 + # and (seconds_streamed - player.corrected_elapsed_time) > 30 + # ): + # await asyncio.sleep(1) if not enable_icy: continue diff --git a/music_assistant/server/helpers/didl_lite.py b/music_assistant/server/helpers/didl_lite.py index 7c1f5149..d5be2943 100644 --- a/music_assistant/server/helpers/didl_lite.py +++ b/music_assistant/server/helpers/didl_lite.py @@ -39,7 +39,7 @@ def create_didl_metadata(url: str, queue_item: QueueItem, flow_mode: bool = Fals '' f'' f"{_escape_str(queue_item.name)}" - f"{queue_item.image_url}" + f"{_escape_str(queue_item.image_url)}" f"{image}" "object.item.audioItem.audioBroadcast" f"audio/{ext}"