Artist images in recent tracks feed
Sunday April 20, 2008 3:38 PM
Someone on the last.fm forums was asking about artist images for recently scrobbled tracks, so I though I'd look into adding them to our recent tracks feed.
Unfortunately, that artist info is really hard to get to on-demand. There's no info feed for artists, so even though you can get Similar Artists, Top Fans, Top Tracks, Top Albums, Top Tags, and Current Events, you can't get a simple artist detail. However, if you pull the similar artists feed, pick the first artist in the list, then pull that artist's similar artists feed, you can spin through those artists and find the target artist. This method does work, but does not seem to generate matches for all artists, so there are some blanks here and there. I've got a cron job running to update all of the artists that are already cached in our DB (around 1100) with the image data, it should be done by this time tomorrow. Any artists not already in our DB will have their image data saved as they come in on the last.fm recent tracks feeds.
ZenRadar recent tracks feeds now have small and large artist images in the artist nodes, like this:
<artist mbid="">
Sound Tribe Sector 9
<url>http://www.last.fm/music/Sound+Tribe+Sector+9</url>
<image_small>http://userserve-ak.last.fm/serve/50/86460.jpg</image_small>
<image_large>http://userserve-ak.last.fm/serve/160/86460.jpg</image_large>
</artist>
Which will give you:


Artists that we haven't found images for will have the last.fm default "no artist" images:

http://cdn.last.fm/depth/catalogue/noimage/noartist_50px.jpg

http://cdn.last.fm/depth/catalogue/noimage/noartist_140px.jpg
I hope this is useful, let me know if you have any questions, or if you'd like artist images added to any of the other feeds.
Unfortunately, that artist info is really hard to get to on-demand. There's no info feed for artists, so even though you can get Similar Artists, Top Fans, Top Tracks, Top Albums, Top Tags, and Current Events, you can't get a simple artist detail. However, if you pull the similar artists feed, pick the first artist in the list, then pull that artist's similar artists feed, you can spin through those artists and find the target artist. This method does work, but does not seem to generate matches for all artists, so there are some blanks here and there. I've got a cron job running to update all of the artists that are already cached in our DB (around 1100) with the image data, it should be done by this time tomorrow. Any artists not already in our DB will have their image data saved as they come in on the last.fm recent tracks feeds.
ZenRadar recent tracks feeds now have small and large artist images in the artist nodes, like this:
<artist mbid="">
Sound Tribe Sector 9
<url>http://www.last.fm/music/Sound+Tribe+Sector+9</url>
<image_small>http://userserve-ak.last.fm/serve/50/86460.jpg</image_small>
<image_large>http://userserve-ak.last.fm/serve/160/86460.jpg</image_large>
</artist>
Which will give you:


Artists that we haven't found images for will have the last.fm default "no artist" images:

http://cdn.last.fm/depth/catalogue/noimage/noartist_50px.jpg

http://cdn.last.fm/depth/catalogue/noimage/noartist_140px.jpg
I hope this is useful, let me know if you have any questions, or if you'd like artist images added to any of the other feeds.
Context: ZR Development

