From f4e11ed1701a9dbfa3720418e6ee3a7f4a0986b7 Mon Sep 17 00:00:00 2001 From: corycorycory Date: Sat, 21 Jun 2014 10:45:23 -0500 Subject: [PATCH] Update __init__.py user_playlist doesn't work with starred playlists, which pass an ID of None. This will allow the user to pull data for starred playlists, which use the URI users/%s/starrred --- spotipy/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spotipy/__init__.py b/spotipy/__init__.py index beb039e..5969c70 100644 --- a/spotipy/__init__.py +++ b/spotipy/__init__.py @@ -206,6 +206,8 @@ class Spotify(object): def user_playlist(self, user, playlist_id, fields=None): ''' Gets playlist of a user ''' + if playlist_id == None: + return self.get("users/%s/starred" % (user), fields=fields) return self.get("users/%s/playlists/%s" % (user, playlist_id), fields=fields) def user_playlist_create(self, user, name, public=True):