|
@@ -163,9 +163,25 @@ class Soundcloudcom extends ElementFactory
|
163
|
163
|
|
164
|
164
|
if (array_key_exists('artwork_url', $result) )
|
165
|
165
|
{
|
166
|
|
- $this->element->setData(Element::DATA_THUMB_URL, $result['artwork_url']);
|
|
166
|
+ if ($result['artwork_url'])
|
|
167
|
+ {
|
|
168
|
+ $this->element->setData(Element::DATA_THUMB_URL, $result['artwork_url']);
|
|
169
|
+ }
|
|
170
|
+ else
|
|
171
|
+ {
|
|
172
|
+ if (array_key_exists('user', $result) )
|
|
173
|
+ {
|
|
174
|
+ if (array_key_exists('avatar_url', $result['user']) )
|
|
175
|
+ {
|
|
176
|
+ if ($result['user']['avatar_url'])
|
|
177
|
+ {
|
|
178
|
+ $this->element->setData(Element::DATA_THUMB_URL, $result['user']['avatar_url']);
|
|
179
|
+ }
|
|
180
|
+ }
|
|
181
|
+ }
|
|
182
|
+ }
|
167
|
183
|
}
|
168
|
|
-
|
|
184
|
+
|
169
|
185
|
if (array_key_exists('kind', $result) )
|
170
|
186
|
{
|
171
|
187
|
$this->element->setData(Element::DATA_TYPE, $result['kind']);
|