mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 20:27:08 +00:00
Identify more Sonos radio stations with poor titles (#33609)
This commit is contained in:
parent
c6ba607c8c
commit
c628c2cef2
@ -614,11 +614,11 @@ class SonosEntity(MediaPlayerDevice):
|
||||
except (TypeError, KeyError, AttributeError):
|
||||
pass
|
||||
|
||||
# Radios without tagging can have the radio URI as title. Non-playing
|
||||
# radios will not have a current title. In these cases we try to use
|
||||
# the radio name instead.
|
||||
# Radios without tagging can have part of the radio URI as title.
|
||||
# Non-playing radios will not have a current title. In these cases we
|
||||
# try to use the radio name instead.
|
||||
try:
|
||||
if self.soco.is_radio_uri(self._media_title) or self.state != STATE_PLAYING:
|
||||
if self._media_title in self._uri or self.state != STATE_PLAYING:
|
||||
self._media_title = variables["enqueued_transport_uri_meta_data"].title
|
||||
except (TypeError, KeyError, AttributeError):
|
||||
pass
|
||||
|
Loading…
x
Reference in New Issue
Block a user