Tuesday, February 20, 2007

SKY.fm stream integration

Today I sat down to see if I could integrate SKY.fm streams into Amarok radio-streams and did come up with proof-of-concept. Basically the playlistbrowser fires up an external process and waits for it to fetch and parse the station names and playlists corresponding to those stations. Right now the external program is a hardcoded ruby script which is incomplete. The code works fine for the following /tmp/amarok-skyfm-pls.xml

<?xml version='1.0' encoding='UTF-8'?>
<stationlist>
<station name="Smooth Jazz" href="http://www.sky.fm/mp3/smoothjazz.pls" />
<station name="Top Hits" href="http://www.sky.fm/mp3/tophits.pls" />
<station name="The 80s" href="http://www.sky.fm/mp3/the80s.pls" />
<station name="Hit 70s" href="http://www.sky.fm/mp3/hit70s.pls" />
</stationlist>

Right now I need help with the script in scraping the stations and playlists off of the javascript file at fky.fm website. Code in diff -urNp output format is here (Check the next post instead). Here is a screenshot.

No comments: