ArtistconnectorSweden/spotify-web-api-wrapper-php — pull request #6 by Sytanek (2014-06-22 19:05:20+00:00)
Title: Update Spotify.php

getTracksInPlaylist returns a maximum of 100 results. If there are more than 100 results, then you need to specify an offset of the previous offset + 100. Something I have done to mine, which could possibly done here, is to automatically return all results.

$data['next'] = 'start';
while($data['next'] != '')
{
$data = $this->request('GET', SPOTIFY_API_ENDPOINT, '/users/' . $user . '/playlists/' . $playlist . '/tracks? offset=' . $offset , 'json', NULL);
$offset = $offset + 100;
foreach($data['items'] as $item)
{
$collection[] = $item;
}
}
return $collection[];