pull/488/head
Jon Maddox 2015-10-07 01:42:50 -04:00
parent 9a3c76c263
commit 85338887b4
1 changed files with 4 additions and 1 deletions

View File

@ -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')