From a2c6a6d39e2ae7f6e09e340bab0d373094ea4c5a Mon Sep 17 00:00:00 2001 From: sprocket-9 Date: Wed, 3 Apr 2024 09:03:57 +0100 Subject: [PATCH] Fixes Spotify API for library Add/Remove of Artist --- music_assistant/server/providers/spotify/__init__.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/music_assistant/server/providers/spotify/__init__.py b/music_assistant/server/providers/spotify/__init__.py index e78ddc4a9..9bf688ae1 100644 --- a/music_assistant/server/providers/spotify/__init__.py +++ b/music_assistant/server/providers/spotify/__init__.py @@ -348,7 +348,7 @@ async def library_add(self, prov_item_id, media_type: MediaType): """Add item to library.""" result = False if media_type == MediaType.ARTIST: - result = await self._put_data("me/following", {"ids": [prov_item_id], "type": "artist"}) + result = await self._put_data("me/following", {"ids": [prov_item_id]}, type="artist") elif media_type == MediaType.ALBUM: result = await self._put_data("me/albums", {"ids": [prov_item_id]}) elif media_type == MediaType.TRACK: @@ -363,9 +363,7 @@ async def library_remove(self, prov_item_id, media_type: MediaType): """Remove item from library.""" result = False if media_type == MediaType.ARTIST: - result = await self._delete_data( - "me/following", {"ids": [prov_item_id], "type": "artist"} - ) + result = await self._delete_data("me/following", {"ids": [prov_item_id]}, type="artist") elif media_type == MediaType.ALBUM: result = await self._delete_data("me/albums", {"ids": [prov_item_id]}) elif media_type == MediaType.TRACK: