mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Add guard for Sonos S1 radio show compatibility (#70251)
This commit is contained in:
parent
16c6d79265
commit
c29a5dc3fd
@ -172,7 +172,8 @@ class SonosMedia:
|
|||||||
if et_uri_md:
|
if et_uri_md:
|
||||||
self.channel = et_uri_md.title
|
self.channel = et_uri_md.title
|
||||||
|
|
||||||
if ct_md and ct_md.radio_show:
|
# Extra guards for S1 compatibility
|
||||||
|
if ct_md and hasattr(ct_md, "radio_show") and ct_md.radio_show:
|
||||||
radio_show = ct_md.radio_show.split(",")[0]
|
radio_show = ct_md.radio_show.split(",")[0]
|
||||||
self.channel = " • ".join(filter(None, [self.channel, radio_show]))
|
self.channel = " • ".join(filter(None, [self.channel, radio_show]))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user