[SoundcloudBridge] Fix for artists with few tracks (#970)
Artists with less than 10 tracks would return blank articles. This fixes that.
This commit is contained in:
parent
6c1d861529
commit
4438807b26
1 changed files with 2 additions and 1 deletions
|
@ -32,7 +32,8 @@ class SoundCloudBridge extends BridgeAbstract {
|
||||||
. self::CLIENT_ID
|
. self::CLIENT_ID
|
||||||
)) or returnServerError('No results for this user');
|
)) 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 = array();
|
||||||
$item['author'] = $tracks[$i]->user->username;
|
$item['author'] = $tracks[$i]->user->username;
|
||||||
$item['title'] = $tracks[$i]->user->username . ' - ' . $tracks[$i]->title;
|
$item['title'] = $tracks[$i]->user->username . ' - ' . $tracks[$i]->title;
|
||||||
|
|
Loading…
Reference in a new issue