mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 17:27:10 +00:00
Upgrade pysonos to 0.0.50 (#51125)
This commit is contained in:
parent
e4e3dc7fab
commit
fdfb84e8e2
@ -3,7 +3,7 @@
|
||||
"name": "Sonos",
|
||||
"config_flow": true,
|
||||
"documentation": "https://www.home-assistant.io/integrations/sonos",
|
||||
"requirements": ["pysonos==0.0.49"],
|
||||
"requirements": ["pysonos==0.0.50"],
|
||||
"after_dependencies": ["plex"],
|
||||
"ssdp": [
|
||||
{
|
||||
|
@ -14,6 +14,7 @@ from pysonos.core import (
|
||||
PLAY_MODES,
|
||||
)
|
||||
from pysonos.exceptions import SoCoException, SoCoUPnPException
|
||||
from pysonos.plugins.sharelink import ShareLinkPlugin
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.media_player import MediaPlayerEntity
|
||||
@ -522,10 +523,11 @@ class SonosMediaPlayerEntity(SonosEntity, MediaPlayerEntity):
|
||||
media_id = media_id[len(PLEX_URI_SCHEME) :]
|
||||
play_on_sonos(self.hass, media_type, media_id, self.name) # type: ignore[no-untyped-call]
|
||||
elif media_type in (MEDIA_TYPE_MUSIC, MEDIA_TYPE_TRACK):
|
||||
share_link = ShareLinkPlugin(soco)
|
||||
if kwargs.get(ATTR_MEDIA_ENQUEUE):
|
||||
try:
|
||||
if soco.is_service_uri(media_id):
|
||||
soco.add_service_uri_to_queue(media_id)
|
||||
if share_link.is_share_link(media_id):
|
||||
share_link.add_share_link_to_queue(media_id)
|
||||
else:
|
||||
soco.add_uri_to_queue(media_id)
|
||||
except SoCoUPnPException:
|
||||
@ -536,9 +538,9 @@ class SonosMediaPlayerEntity(SonosEntity, MediaPlayerEntity):
|
||||
media_id,
|
||||
)
|
||||
else:
|
||||
if soco.is_service_uri(media_id):
|
||||
if share_link.is_share_link(media_id):
|
||||
soco.clear_queue()
|
||||
soco.add_service_uri_to_queue(media_id)
|
||||
share_link.add_share_link_to_queue(media_id)
|
||||
soco.play_from_queue(0)
|
||||
else:
|
||||
soco.play_uri(media_id)
|
||||
|
@ -1756,7 +1756,7 @@ pysnmp==4.4.12
|
||||
pysoma==0.0.10
|
||||
|
||||
# homeassistant.components.sonos
|
||||
pysonos==0.0.49
|
||||
pysonos==0.0.50
|
||||
|
||||
# homeassistant.components.spc
|
||||
pyspcwebgw==0.4.0
|
||||
|
@ -983,7 +983,7 @@ pysmartthings==0.7.6
|
||||
pysoma==0.0.10
|
||||
|
||||
# homeassistant.components.sonos
|
||||
pysonos==0.0.49
|
||||
pysonos==0.0.50
|
||||
|
||||
# homeassistant.components.spc
|
||||
pyspcwebgw==0.4.0
|
||||
|
Loading…
x
Reference in New Issue
Block a user