Posted October 8, 2008 and filed under Technology    tags:  ,

lastfm User ControlI’ve noticed several people using last.fm and decided to head over there for a look.  The concept is pretty cool…  last.fm tracks all of my music habits and tastes.  Armed with this historical information I can look for music and people with similar taste as mine.  For example, if I am listening to Oasis (as I am doing now) and wanted to hear comparable bands I would simply start my radio station with Oasis and then last.fm would play music from the same genre.  This service really helps identify your listening habits and helps you find new music.

Let’s put aside the security implications regarding having last.fm store your listening habits.  After all, you choose to sign-up, choose which music to Scrobble (how last.fm captures your listening event), and ultimately choose to interact with the service.

Oh, and now my radio station has just started playing Empire by Kasabian… ever heard of them?  I haven’t until now…  and they sound pretty good!  So lets assume you have already jumped over to last.fm and have become interested like me…  Let’s also suppose you wanted to share your music taste with the world by placing a widget of sorts on your blog.  Well there are plenty pre-built widgets and what-nots that you can choose from…  But nothing was exactly what I was seeking for my blog.  As it turns out there is an API available for developers (and engineers like me)… 

So after a little playing around I produced a User Control that will display my recent play-list in almost any format I want.  As you can see by the attached image the current configuration only shows the album cover of the song.  You might also notice the small icon on the bottom-right corner of the top-left album.  This image indicates that I am listening to a track at that exact moment.  If the album is blank, as it seems to be sometimes, a placeholder image is inserted with the correct size to match the other album covers.

So that’s it.  If you’re interested then download it and have a look.  If you find any bugs or have any issues please let me know!

Oh, and now my station is playing Lucky Man by The Verve.  Way cool!

attachment lastfmRecentTracks.zip

 

UPDATE:  For some strange reason the last.fm recenttracks feed removed the date value which threw a wrench into my code.  I have updated it in a way that will work with or without the date value.  If you have already downloaded it before October 22nd then please download it again.

image

If you liked this article why not share it with others?

Kick it up to DotNetKicks.com

Comments

Add comment


(Will show your Gravatar icon)

biuquote
Loading