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
'<DIDL-Lite xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/" xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/">'
f'<item id="{queue_item.queue_item_id}" parentID="0" restricted="1">'
f"<dc:title>{_escape_str(queue_item.name)}</dc:title>"
- f"<upnp:albumArtURI>{queue_item.image_url}</upnp:albumArtURI>"
+ f"<upnp:albumArtURI>{_escape_str(queue_item.image_url)}</upnp:albumArtURI>"
f"<dc:queueItemId>{image}</dc:queueItemId>"
"<upnp:class>object.item.audioItem.audioBroadcast</upnp:class>"
f"<upnp:mimeType>audio/{ext}</upnp:mimeType>"