diversify
diversify copied to clipboard
Implement flat feature for get_user_playlist() method
The get_user_playlists() method from the spotify interface return a list of playlists data. Each playlist item has a list of its song data. The flat feature is meant to flatten the playlists, basically returning a huge lists with all the songs from the playlists merged by removing the playlists data.
Example:
def get_user_playlists(spfy, userid, features=False, flat=False):
if flat:
return # list of all songs in all playlists
else:
return # list of playlists tuples like (playlist name, list of songs in playlist)
Fixed it on commit 029c9389c32100ec81e3be6faa9dd1bc57d8d70f.