From 4b23c8375d25adc29aa449b0fa5056e3c6b177e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20K=C3=B6ckerling?= Date: Sun, 29 Sep 2024 16:05:33 +0200 Subject: [PATCH] Fix request for User#save_tracks! --- lib/rspotify/user.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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