New py_shoutcast, Freevo plugin

Finally got around to updating py_shoutcast to the new Shoutcast XML format/layout. This was actually reported to me back at the end of May by Mats Joensson (along with a patch), just haven’t had the time to look at it before now. I would have much preferred to use his patch, but the upstream changes pretty much required a complete rewrite in the parsing code.

If anyone is actually using the python module for anything other than the Freevo plugin, you’ll notice calling ShoutcastFeed.parse_stations() no longer does it all. This is because Shoutcast now requires a fetch of the genre list, then fetching a list of of the stations in that genre. Now you have to use GenreFeed.parse_genres() to grab the list genres, then call ShoutFeed.parse_stations() for each genre.

The parameters have also changed for parse_stations(), most notably the no_compress and feed_max have been removed. They simply don’t exist anymore upstream. One nicety is that I was able to remove the genre regex kludge, and the genre/station list split had resulted in things feeling much faster in the Freevo plugin.

I’ve setup a Trac install, so you’ll be able to find the newest releases on the download page there. Please submit any bugs, patches (my favorite) or feature requests on the ticket tracker.

One thought on “New py_shoutcast, Freevo plugin

  1. Just d/l’d 0.8, and you forgot to set DEBUG=0 in the file. Otherwise you get:
    >>> genre.parse_genres()
    Traceback (most recent call last):
    File “”, line 1, in ?
    File “py_shoutcast/”, line 166, in parse_genres
    if DEBUG == 1:
    NameError: global name ‘DEBUG’ is not defined

Leave a Reply