mirror of
https://github.com/c0de-archive/spotipy.git
synced 2025-01-08 15:42:48 +00:00
Fix remove_specific_occurrences function
user_playlist_remove_specific_occurrences_of_tracks is expecting a different tracklist object to the one that is documented, causing a "'dict' object has no attribute 'split'" error. Update it to expect the correct format.
This commit is contained in:
parent
202435f6a6
commit
98ebb6a163
@ -374,7 +374,12 @@ class Spotify(object):
|
|||||||
'''
|
'''
|
||||||
|
|
||||||
plid = self._get_id('playlist', playlist_id)
|
plid = self._get_id('playlist', playlist_id)
|
||||||
ftracks = [ self._get_uri('track', tid) for tid in tracks]
|
ftracks = []
|
||||||
|
for tr in tracks:
|
||||||
|
ftracks.append({
|
||||||
|
"uri": self._get_uri("track", tr["uri"]),
|
||||||
|
"positions": tr["positions"],
|
||||||
|
})
|
||||||
payload = { "tracks": ftracks }
|
payload = { "tracks": ftracks }
|
||||||
return self._delete("users/%s/playlists/%s/tracks" % (user, plid),
|
return self._delete("users/%s/playlists/%s/tracks" % (user, plid),
|
||||||
payload = payload)
|
payload = payload)
|
||||||
|
Loading…
Reference in New Issue
Block a user