Last.Fm Radio Stream Player Gadget 0.5 Released!

By Geert van der Cruijsen at July 25, 2008 22:36
Filed Under: Cool Stuff, Geert's Projects

Update 08-06-2010: the last.fm gadget does not work anymore. Last.fm changed their client server protocols and therefore the gadget is not working anymore. I'm not using Last.fm anymore so i'm not planning on updating the gadget in the future

 

 

Last week my mailbox was flooded by mails of people who were telling me my Windows Vista Sidebar gadget to play Last.fm radio was broken.

I tested it myself and concluded that this was indeed the case. Last.fm changed their website last week and my guess is that they also changed their streaming service.

After a full night of debugging I found out what was the problem and I fixed it in a new version which can be now downloaded from the download area.

If you are interested in what was changed read on. The change was fairly simple, the protocol uses 2 handshakes to connect to the service. The first handshake is to connect to the scrobbling service. The second handshake is used to connect to the streaming service. Before last week requesting the mp3 stream was done by sending the sessionid of the first handshake. Now... it seems you have to send the sessionid you get with the second handshake. It took some time to figure this out but now everything seems to work fine again.

Protocol example:

Handshake 1 request:

http://ws.audioscrobbler.com/radio/handshake.php?version=1.4.2.58376&platform=win32&platformversion=Windows%20Vista&username=geertvdcruijsen&passwordmd5=
4d9309866b98863c3c3336e50392831b&language=en&player=winamp

Handshake 1 response from last.fm:

session=bbe5e763d1e1deb988595cecf1c21e9d stream_url=http://87.117.229.85:80/last.mp3?Session=bbe5e763d1e1deb988595cecf1c21e9d subscriber=0 framehack=0base_url=ws.audioscrobbler.com base_path=/radio info_message= fingerprint_upload_url=http://ws.audioscrobbler.com/fingerprint/upload.php permit_bootstrap=0

Handshake 2 request:

http://post.audioscrobbler.com/?hs=true&p=1.2&c=tst&v=1.3.1.1&u=geertvdcruijsen
&t=1217017120&a=2a060e72c7aae132e8fad06b741be806

Handshake 2 response from last.fm:

OK 7e5b82460d2a45e382b81c437ae6a87a http://post.audioscrobbler.com:80/np_1.2 http://87.117.229.205:80/protocol_1.2

Tune to the right radio channel:

http://ws.audioscrobbler.com/radio/adjust.php?session=bbe5e763d1e1deb988595cecf1c21e9d&url=lastfm://artist/muse

Response to channel change request from last.fm:

response=OK url=lastfm://artist/muse stationname= Muse’s Similar Artists discovery=true

Request metadata of stream:

http://ws.audioscrobbler.com/radio/xspf.php?sk=bbe5e763d1e1deb988595cecf1c21e9d
&discovery=0&desktop=1.3.1.1&time=1217017120321

I was happy to receive the mails of complaints because this is proof people are actually using my gadget :) Hopefully all problems are fixed now so happy listening!

Geert van der Cruijsen

Comments

6/7/2010 6:02:54 AM #

The last.fm vista gadget is broken. The link to download the latest version is broken also. Lol!

Noel

6/8/2010 9:10:45 AM #

I still get a lot of mail about the last.fm gadget. Last.fm updated their protocols and since that time the gadget doesnt work anymore.

I don't use Last.fm anymore and i'm not planning on updating the gadget in the future. sorry!

Geert van der Cruijsen

7/26/2010 1:52:17 AM #

Can I quote you on my website if I link again to your website?

Mickey Citron

7/26/2010 1:52:21 AM #

that is just what I was in search of

Jeffry Falkenthal

7/26/2010 6:54:35 AM #

Have you ever considered adding up extra videos about Last.fm to your blog posts to hold the visitors extra entertained? I mean I just read through the whole piece of writing of yours and it had been quite pleasant but since I'm more of a visual learner,I found that to become more helpful well let me know how it turns out! I enjoy what you guys are always up too. Such skillful work and reporting! Maintain the great works guys I've added you guys to my blogroll. This is a good article thanks for sharing this informative information.. I will visit your blog regularly for some latest post.

Adan Marchel

7/26/2010 6:54:47 AM #

Hello. That is form of an "unconventional" query , but produce other visitors requested you ways get the menu bar to appear like you have bought it? I even have a blog and am actually seeking to alter across the theme, however am scared to death to mess with it for concern of the search engines punishing me. I'm very new to all of this ...so i am simply not positive precisely how you can attempt to to it all yet. I'll just maintain working on it one day at a time Thanks for any assist you can offer here.

Jenee Navia

7/27/2010 12:22:48 AM #

this is just what I was seeking

Ellis Alvidrez

7/27/2010 12:22:49 AM #

I was wondering if you would like to be a visitor poster on my blog? and in alternate you possibly can put one hyperlink the submit? Please reply once you get an opportunity and I will ship you my contact particulars - thanks

Cassandra Boccia

7/27/2010 5:21:55 AM #

Whereas this topic could be very sensitive for most individuals, my opinion is that there must be a center or frequent floor that we all can find. I do recognize that youve added relevant and intelligent commentary here though. Thanks!

Ammie Juneja

7/27/2010 5:21:56 AM #

What a super site!

Christena Kossey

Add comment



biuquote
Loading