Track Images(artwork_url) not returned by Soundcloud API

ε祈祈猫儿з 提交于 2020-01-03 04:28:06

问题


I am using Soundcloud API to retrieve a list a tracks in my windows phone app(using C#). In the .json file of the tracks, I see that there is no image returned for some tracks (i.e. "artwork_url":null).

(NOTE: On the other hand, in other 3rd party Soundcloud apps on WP8, I can see the same tracks along with their respective images.)

Is there any way I could receive complete information? Thanks in advance!


回答1:


If its null, its not defined. SC uses on their website a logic to use the default avatar when there is no artwork defined.

Compare with this sketch:

SC.get('/tracks/97617992', function(sound) {
console.log(sound.artwork_url);
$('#result').append('<img src="' +sound.user.avatar_url+'"/>' );
});

http://jsfiddle.net/iambnz/ngtzdx8c/



来源:https://stackoverflow.com/questions/26066587/track-imagesartwork-url-not-returned-by-soundcloud-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!