diff --git a/lib/rspotify/user.rb b/lib/rspotify/user.rb index 0f4ef779..48a8854b 100644 --- a/lib/rspotify/user.rb +++ b/lib/rspotify/user.rb @@ -317,8 +317,8 @@ def remove_tracks!(tracks) def save_tracks!(tracks) tracks_ids = tracks.map(&:id) url = "me/tracks" - request_body = tracks_ids.inspect - User.oauth_put(@id, url, request_body) + request_body = { ids: tracks_ids } + User.oauth_put(@id, url, request_body.to_json) tracks end