Fix Sonos album art for non-radio streams

pull/4958/head
andrey 2016-12-17 10:12:22 +02:00
parent 326cc83a17
commit d71502d18f
3 changed files with 13 additions and 8 deletions

View File

@ -424,6 +424,7 @@ class SonosDevice(MediaPlayerDevice):
media_artist = track_info.get('artist')
media_album_name = track_info.get('album')
media_title = track_info.get('title')
media_image_url = track_info.get('album_art', None)
media_position = None
media_position_updated_at = None
@ -453,6 +454,7 @@ class SonosDevice(MediaPlayerDevice):
media_image_url = None
elif is_radio_stream:
if media_image_url in ('', 'NOT_IMPLEMENTED', None):
media_image_url = self._format_media_image_url(
current_media_uri
)
@ -520,6 +522,7 @@ class SonosDevice(MediaPlayerDevice):
else:
# not a radio stream
if media_image_url in ('', 'NOT_IMPLEMENTED', None):
media_image_url = self._format_media_image_url(
track_info['uri']
)

View File

@ -10,7 +10,7 @@ aiohttp==1.1.6
async_timeout==1.1.0
# 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
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
# 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
https://github.com/nkgilley/python-ecobee-api/archive/4856a704670c53afe1882178a89c209b5f98533d.zip#python-ecobee==0.0.6

2
requiremetns.txt Normal file
View File

@ -0,0 +1,2 @@
# homeassistant.components.media_player.sonos
SoCo==0.12