2009-03-05

./shoutcast-radio

Just like my older post about a "./jamendo-player", this time I am definitely more interested into good online radio stations. And SHOUTcast is the best that comes to my mind! It's been there for years, Winamp is the best music experience ever, and both have been promoting each other even though I don't know/remember what their relation are.

The good things about their widget is that it saves the recent radios and it also has a list of favorites but this one isn't working as-is with the code. It is possible to search for radios and to browse by genre. All of this stuff is saved under ~/.macromedia/Flash_Player/#SharedObjects/<random>/ct.yourminis.com/.



So of course I couldn't resist but embed their available Flash widget inside a window :-) Again the code is very short, it's just about loading — well not a URL this time — an HTML string cause the Flash application all alone doesn't work out, it needs parameters passed outside. I didn't include the callbacks to handle "_blank" links, which means it is not possible to open any links, but this is useless as the widget is fully functionnal.

You can download the source code here.

Here are some installation instructions:
  1. Look into main.c
  2. The first line of main.c is a comment with a command to compile
  3. If you want a menu item in you desktop menu:
    1. Edit the Exec keys in shoutcast-radio.desktop
    2. Copy the desktop file to ${XDG_DATA_HOME:-~/.local/share}/applications
  4. If you don't have a gnome-radio icon, copy gnome-radio.png to ~/.icons/
By the way, I'm linking on the Xfce blog. Why? Cause there might be Xfce users interested into a simple to compile radio application. At least I hope some of you will enjoy it, more than the jamendo thingy :)

Update: The favorites actually do work, it just that the favorite button isn't always clickable.

4 comments:

  1. thanks for this ... it looks really nice (being flash and all) but it seems to crash whenever it is about to start playing the stream ... any ideas what might be causing that? i'm using xubuntu 8.10 if that matters

    thnx again
    :)

    ReplyDelete
  2. Yes, webkit! I have version 1.1.0 r41121 and it works quite well (no crashes at all). I had a lot of bad experience with 1.0.3 and many other revisions. One revision from 1.0.0 was also very good... so as you can understand it depends on the stability of webkit. The only recommendation is to build a newer webkit version from svn.

    I have noted another problem however, when the stream is stopped by network issues, the application displays a small modal dialog with "Tune now" and "Tune later", but from there it's not possible to get back to the player even if it can happen that the stream continues to play after that. The only solution is to restart the application. This can get very annoying.

    ReplyDelete
  3. ahhhhhhhhhhh it's probably the webkit version i have then ... i think i have 1.01 ... great idea though to host a flash app so easily

    lauren
    :)

    ReplyDelete
  4. FWIW, you have to try VLC, it has external sources for playlists including ShoutCAST... :-)

    ReplyDelete