mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
wrap it
This commit is contained in:
parent
9a3c76c263
commit
85338887b4
@ -125,7 +125,10 @@ class Itunes(object):
|
||||
response = self._request('GET', '/playlists')
|
||||
playlists = response.get('playlists', [])
|
||||
|
||||
found_playlists = [playlist for playlist in playlists if playlist["name"] == playlist_id_or_name or playlist["id"] == playlist_id_or_name]
|
||||
found_playlists = [playlist for playlist in \
|
||||
playlists if playlist["name"] == playlist_id_or_name or \
|
||||
playlist["id"] == playlist_id_or_name]
|
||||
|
||||
if len(found_playlists) > 0:
|
||||
playlist = found_playlists[0]
|
||||
return self._request('PUT', '/playlists/' + playlist['id'] + '/play')
|
||||
|
Loading…
x
Reference in New Issue
Block a user