diff --git a/bridges/SoundcloudBridge.php b/bridges/SoundcloudBridge.php index 30958566..8938ff96 100644 --- a/bridges/SoundcloudBridge.php +++ b/bridges/SoundcloudBridge.php @@ -16,6 +16,8 @@ class SoundCloudBridge extends BridgeAbstract { const CLIENT_ID = 'W0KEWWILAjDiRH89X0jpwzuq6rbSK08R'; + private $feedIcon = null; + public function collectData(){ $res = json_decode(getContents( @@ -25,6 +27,8 @@ class SoundCloudBridge extends BridgeAbstract { . self::CLIENT_ID )) or returnServerError('No results for this query'); + $this->feedIcon = $res->avatar_url; + $tracks = json_decode(getContents( 'https://api.soundcloud.com/users/' . urlencode($res->id) @@ -56,6 +60,14 @@ class SoundCloudBridge extends BridgeAbstract { } + public function getIcon(){ + if ($this->feedIcon) { + return $this->feedIcon; + } + + return parent::getIcon(); + } + public function getName(){ if(!is_null($this->getInput('u'))) { return self::NAME . ' - ' . $this->getInput('u');