diff --git a/SpotifyAPI.Web/Clients/Interfaces/IPlaylistsClient.cs b/SpotifyAPI.Web/Clients/Interfaces/IPlaylistsClient.cs index 5876f6dee..7909c8bb7 100644 --- a/SpotifyAPI.Web/Clients/Interfaces/IPlaylistsClient.cs +++ b/SpotifyAPI.Web/Clients/Interfaces/IPlaylistsClient.cs @@ -150,7 +150,7 @@ public interface IPlaylistsClient /// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-replace-playlists-tracks /// /// - Task ReplaceItems(string playlistId, PlaylistReplaceItemsRequest request, CancellationToken cancel = default); + Task ReplaceItems(string playlistId, PlaylistReplaceItemsRequest request, CancellationToken cancel = default); /// /// Get a list of the playlists owned or followed by the current Spotify user. diff --git a/SpotifyAPI.Web/Clients/PlaylistsClient.cs b/SpotifyAPI.Web/Clients/PlaylistsClient.cs index 655295c83..5d46a78ea 100644 --- a/SpotifyAPI.Web/Clients/PlaylistsClient.cs +++ b/SpotifyAPI.Web/Clients/PlaylistsClient.cs @@ -96,13 +96,12 @@ public Task Get(string playlistId, PlaylistGetRequest request, Can return API.Get(URLs.Playlist(playlistId), request.BuildQueryParams(), cancel); } - public async Task ReplaceItems(string playlistId, PlaylistReplaceItemsRequest request, CancellationToken cancel = default) + public Task ReplaceItems(string playlistId, PlaylistReplaceItemsRequest request, CancellationToken cancel = default) { Ensure.ArgumentNotNullOrEmptyString(playlistId, nameof(playlistId)); Ensure.ArgumentNotNull(request, nameof(request)); - var statusCode = await API.Put(URLs.PlaylistTracks(playlistId), null, request.BuildBodyParams(), cancel).ConfigureAwait(false); - return statusCode == HttpStatusCode.Created; + return API.Put(URLs.PlaylistTracks(playlistId), null, request.BuildBodyParams(), cancel); } public Task> CurrentUsers(CancellationToken cancel = default)