Skip to content

Commit

Permalink
[SoundcloudBridge] Fix for artists with few tracks (#970)
Browse files Browse the repository at this point in the history
Artists with less than 10 tracks would return blank articles. This fixes that.
  • Loading branch information
Roliga authored and logmanoriginal committed Dec 26, 2018
1 parent 6c1d861 commit 4438807
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bridges/SoundcloudBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ public function collectData(){
. self::CLIENT_ID
)) or returnServerError('No results for this user');

for($i = 0; $i < 10; $i++) {
$numTracks = min(count($tracks), 10);
for($i = 0; $i < $numTracks; $i++) {
$item = array();
$item['author'] = $tracks[$i]->user->username;
$item['title'] = $tracks[$i]->user->username . ' - ' . $tracks[$i]->title;
Expand Down

0 comments on commit 4438807

Please sign in to comment.