Fix Sonos album art for non-radio streams
parent
326cc83a17
commit
d71502d18f
|
@ -424,6 +424,7 @@ class SonosDevice(MediaPlayerDevice):
|
||||||
media_artist = track_info.get('artist')
|
media_artist = track_info.get('artist')
|
||||||
media_album_name = track_info.get('album')
|
media_album_name = track_info.get('album')
|
||||||
media_title = track_info.get('title')
|
media_title = track_info.get('title')
|
||||||
|
media_image_url = track_info.get('album_art', None)
|
||||||
|
|
||||||
media_position = None
|
media_position = None
|
||||||
media_position_updated_at = None
|
media_position_updated_at = None
|
||||||
|
@ -453,9 +454,10 @@ class SonosDevice(MediaPlayerDevice):
|
||||||
media_image_url = None
|
media_image_url = None
|
||||||
|
|
||||||
elif is_radio_stream:
|
elif is_radio_stream:
|
||||||
media_image_url = self._format_media_image_url(
|
if media_image_url in ('', 'NOT_IMPLEMENTED', None):
|
||||||
current_media_uri
|
media_image_url = self._format_media_image_url(
|
||||||
)
|
current_media_uri
|
||||||
|
)
|
||||||
support_previous_track = False
|
support_previous_track = False
|
||||||
support_next_track = False
|
support_next_track = False
|
||||||
support_stop = False
|
support_stop = False
|
||||||
|
@ -520,9 +522,10 @@ class SonosDevice(MediaPlayerDevice):
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# not a radio stream
|
# not a radio stream
|
||||||
media_image_url = self._format_media_image_url(
|
if media_image_url in ('', 'NOT_IMPLEMENTED', None):
|
||||||
track_info['uri']
|
media_image_url = self._format_media_image_url(
|
||||||
)
|
track_info['uri']
|
||||||
|
)
|
||||||
support_previous_track = True
|
support_previous_track = True
|
||||||
support_next_track = True
|
support_next_track = True
|
||||||
support_stop = True
|
support_stop = True
|
||||||
|
|
|
@ -10,7 +10,7 @@ aiohttp==1.1.6
|
||||||
async_timeout==1.1.0
|
async_timeout==1.1.0
|
||||||
|
|
||||||
# homeassistant.components.nuimo_controller
|
# homeassistant.components.nuimo_controller
|
||||||
--only-binary=all http://github.com/getSenic/nuimo-linux-python/archive/29fc42987f74d8090d0e2382e8f248ff5990b8c9.zip#nuimo==1.0.0
|
#--only-binary=all http://github.com/getSenic/nuimo-linux-python/archive/29fc42987f74d8090d0e2382e8f248ff5990b8c9.zip#nuimo==1.0.0
|
||||||
|
|
||||||
# homeassistant.components.isy994
|
# homeassistant.components.isy994
|
||||||
PyISY==1.0.7
|
PyISY==1.0.7
|
||||||
|
@ -227,7 +227,7 @@ https://github.com/kellerza/pyqwikswitch/archive/v0.4.zip#pyqwikswitch==0.4
|
||||||
https://github.com/laf/russound/archive/0.1.6.zip#russound==0.1.6
|
https://github.com/laf/russound/archive/0.1.6.zip#russound==0.1.6
|
||||||
|
|
||||||
# homeassistant.components.switch.anel_pwrctrl
|
# homeassistant.components.switch.anel_pwrctrl
|
||||||
https://github.com/mweinelt/anel-pwrctrl/archive/ed26e8830e28a2bfa4260a9002db23ce3e7e63d7.zip#anel_pwrctrl==0.0.1
|
#https://github.com/mweinelt/anel-pwrctrl/archive/ed26e8830e28a2bfa4260a9002db23ce3e7e63d7.zip#anel_pwrctrl==0.0.1
|
||||||
|
|
||||||
# homeassistant.components.ecobee
|
# homeassistant.components.ecobee
|
||||||
https://github.com/nkgilley/python-ecobee-api/archive/4856a704670c53afe1882178a89c209b5f98533d.zip#python-ecobee==0.0.6
|
https://github.com/nkgilley/python-ecobee-api/archive/4856a704670c53afe1882178a89c209b5f98533d.zip#python-ecobee==0.0.6
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
# homeassistant.components.media_player.sonos
|
||||||
|
SoCo==0.12
|
Loading…
Reference in New Issue