* improve sonos discovery
* fix crash on image url
f"<upnp:duration>{queue_item.duration}</upnp:duration>"
"<upnp:playlistTitle>Music Assistant</upnp:playlistTitle>"
f"<dc:queueItemId>{queue_item.queue_item_id}</dc:queueItemId>"
- f"<upnp:albumArtURI>{image_url}</upnp:albumArtURI>"
+ f"<upnp:albumArtURI>{_escape_str(image_url)}</upnp:albumArtURI>"
f"<upnp:class>{item_class}</upnp:class>"
f"<upnp:mimeType>audio/{ext}</upnp:mimeType>"
f'<res duration="{duration_str}" protocolInfo="http-get:*:audio/{ext}:DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=0d500000000000000000000000000000">{url}</res>'
try:
self._discovery_running = True
self.logger.debug("Sonos discovery started...")
- discovered_devices: set[soco.SoCo] = await asyncio.to_thread(soco.discover, 60)
+ discovered_devices: set[soco.SoCo] = await asyncio.to_thread(
+ soco.discover, 120, allow_network_scan=True
+ )
if discovered_devices is None:
discovered_devices = set()
new_device_ids = {item.uid for item in discovered_devices}