Allow sonos to select album as a source (#9221)

Importing the fix in the PR https://github.com/home-assistant/home-assistant/pull/8258 I noticed that the same error is present also for Spotify album so I have extended the code and tested it. It works fine on my setup
pull/9225/head
Riccardo Canta 2017-08-30 15:10:02 +02:00 committed by Pascal Vizeli
parent f76436f326
commit 56f9ccb877
1 changed files with 2 additions and 1 deletions

View File

@ -897,7 +897,8 @@ class SonosDevice(MediaPlayerDevice):
src = fav.pop()
self._source_name = src['title']
if 'object.container.playlistContainer' in src['meta']:
if ('object.container.playlistContainer' in src['meta'] or
'object.container.album.musicAlbum' in src['meta']):
self._replace_queue_with_playlist(src)
self._player.play_from_queue(0)
else: