"__author__        = "Team XBMC"" would need some correction as well ;) 

in def addLink()

if you have 

liz.setInfo( type="Music", infoLabels={ "Title": server_name ,"Size": int(bitrate)} )

instead of:

liz.setInfo( type="Music", infoLabels={ "Title": server_name ,"Bitrate": bitrate} )

it would allow you to sort by bitrate and bitrate would be displayed as well in station listings



On Sun, Dec 26, 2010 at 10:39 PM, Assen Totin <assen.totin@gmail.com> wrote:

> "cache_file = "%s%s" % (path,'icecast.cache')"  should  be "cache_file =
> os.path.join(path,'icecast.cache')" as I am not sure how that would
> translate cross platform.


>>>   try: os.mkdir(path)
>>>   except: OSError
> is better as
>>     if  not os.path.exists(path):
>>       os.makedirs(path)

Fine. Being mostly a C programmer the try-catch stanza is not really
my favourite, it's just that I saw it this way in a bunch of Python

> you can also "speed it up" by specifying cache_file only once below
> the BASE_URL as there is no need to do it twice in two different defs.

Got it.

> sorry, I am not picking on you or the code, I am just making sure we
> minimize any potential errors.

Not at all - I am thankful for all your corrections. You're actually
helping me get a taste of Python programming (I've never touched it so
far, preferring old-school C and Perl) and also learn a little more on
XBMC internals (I've been using it since Atlantis, but mostly as an

I'll fix the code and send next [SVN Pull] probably tomorrow morning
(i.e. in some 12 hours, it's now evening my time).