Skip to content

Commit d15aa66

Browse files
committed
:octocat: SpotifyClient example allow 200, 201 and 204 status on playlist create (???)
1 parent 06f74fa commit d15aa66

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/Providers/Spotify/SpotifyClient.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ public function addTracks(string $playlistID, array $trackIDs):static{
283283

284284
usleep(self::sleepTimer);
285285

286-
if($playlistAddTracks->getStatusCode() === 201){
286+
if(in_array($playlistAddTracks->getStatusCode(), [200, 201, 204])){
287287
$json = MessageUtil::decodeJSON($playlistAddTracks);
288288

289289
$this->logger->info(sprintf('added tracks %s/%s [%s]', ++$i, count($uris), $json->snapshot_id));

0 commit comments

Comments
 (0)