From 6717075ed842050a46b7474a798a574102723c90 Mon Sep 17 00:00:00 2001 From: Michael Donny Dally Date: Tue, 1 Oct 2024 11:32:44 -0400 Subject: [PATCH 1/2] Fix request for User#save_albums --- 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 48a8854b..4442b9e6 100644 --- a/lib/rspotify/user.rb +++ b/lib/rspotify/user.rb @@ -394,8 +394,8 @@ def remove_albums!(albums) def save_albums!(albums) albums_ids = albums.map(&:id) url = "me/albums" - request_body = albums_ids.inspect - User.oauth_put(@id, url, request_body) + request_body = { ids: tracks_ids } + User.oauth_put(@id, url, request_body.to_json) albums end From 24824b6b4d9aed1a399473aeeb3888162978f05b Mon Sep 17 00:00:00 2001 From: Michael Dally Date: Thu, 3 Oct 2024 10:24:51 -0400 Subject: [PATCH 2/2] Update lib/rspotify/user.rb --- lib/rspotify/user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rspotify/user.rb b/lib/rspotify/user.rb index 4442b9e6..2cdfedc2 100644 --- a/lib/rspotify/user.rb +++ b/lib/rspotify/user.rb @@ -394,7 +394,7 @@ def remove_albums!(albums) def save_albums!(albums) albums_ids = albums.map(&:id) url = "me/albums" - request_body = { ids: tracks_ids } + request_body = { ids: albums_ids } User.oauth_put(@id, url, request_body.to_json) albums end