Browse Source

add bitrate in front of the name, and when comparing, skip over it..

[git-p4: depot-paths = "//depot/": change = 841]
v0.3
John-Mark Gurney 19 years ago
parent
commit
fffa530e2e
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      shoutcast.py

+ 6
- 1
shoutcast.py View File

@@ -261,6 +261,10 @@ class ShoutStation(AudioItem):
self.station['MimeType'].encode('ascii'))
self.bitrate = self.station['Bitrate'] * 128 # 1024k / 8bit

def stationwbitratecmp(x, y):
x, y = map(lambda x: x.split('-', 1)[1], (x, y))
return cmp(x, y)

class ShoutGenre(MusicGenre):
def __init__(self, *args, **kwargs):
self.genre = kwargs['genre']
@@ -319,7 +323,8 @@ class ShoutGenre(MusicGenre):

doupdate = True
self.pathObjmap[name] = self.cd.addItem(self.id,
ShoutStation, name, station = i)
ShoutStation, '%sk-%s' % (i['Bitrate'], name),
station = i)

self.sl = stations



||||||
x
 
000:0
Loading…
Cancel
Save