Skip to content

Commit

Permalink
Merge pull request #29 from scottcarlson/fix/searchArtistImageResults
Browse files Browse the repository at this point in the history
Fix artist search image results
  • Loading branch information
devilcius authored Aug 16, 2018
2 parents 8efa73f + 6fceae9 commit ad5a29e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/lastfmapi/Api/ArtistApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -547,8 +547,11 @@ public function search($methodVars)
$searchResults['results'][$i]['mbid'] = (string) $artist->mbid;
$searchResults['results'][$i]['url'] = (string) $artist->url;
$searchResults['results'][$i]['streamable'] = (string) $artist->streamable;
$searchResults['results'][$i]['image']['small'] = (string) $artist->image_small;
$searchResults['results'][$i]['image']['large'] = (string) $artist->image;
$searchResults['results'][$i]['image']['small'] = (string) $artist->image[0];
$searchResults['results'][$i]['image']['medium'] = (string) $artist->image[1];
$searchResults['results'][$i]['image']['large'] = (string) $artist->image[2];
$searchResults['results'][$i]['image']['extralarge'] = (string) $artist->image[3];
$searchResults['results'][$i]['image']['mega'] = (string) $artist->image[4];
$i++;
}

Expand All @@ -560,7 +563,7 @@ public function search($methodVars)
return false;
}
} else {
throw new InvalidArgumentException('You must include artist varialbe in the call for this method');
throw new InvalidArgumentException('You must include artist variable in the call for this method');
}
}

Expand Down

0 comments on commit ad5a29e

Please sign in to comment.