From: stephendenham Date: Sun, 19 Aug 2012 12:00:55 +0000 (+0000) Subject: Cache streams. X-Git-Url: https://git.hcoop.net/clinton/xbmc-groove.git/commitdiff_plain/7a57b8d10d76c49f9eb15e9e333e948a5b1f5345 Cache streams. git-svn-id: svn://svn.code.sf.net/p/xbmc-groove/code@79 2dec19e3-eb1d-4749-8193-008c8bba0994 --- diff --git a/default.py b/default.py index 099f21a..3a5551c 100644 --- a/default.py +++ b/default.py @@ -521,7 +521,7 @@ class Grooveshark: xbmc.executebuiltin('XBMC.Notification(' + __language__(30008) + ', ' + __language__(30044) + ', 1000, ' + thumbDef + ')') # Make a song directory item - def songItem(self, songid, name, album, artist, coverart, trackLabelFormat=ARTIST_ALBUM_NAME_LABEL): + def songItem(self, songid, name, album, artist, coverart, trackLabelFormat=ARTIST_ALBUM_NAME_LABEL, tracknumber=1): stream = self._getSongStream(songid) if stream != False: @@ -536,7 +536,7 @@ class Grooveshark: trackLabel = artist + " - " + album + " - " + name item = xbmcgui.ListItem(label = trackLabel, thumbnailImage=songImg, iconImage=songImg) item.setPath(url) - item.setInfo( type="music", infoLabels={ "title": name, "album": album, "artist": artist, "duration": duration} ) + item.setInfo( type="music", infoLabels={ "title": name, "album": album, "artist": artist, "duration": duration, "tracknumber" : tracknumber} ) item.setProperty('mimetype', 'audio/mpeg') item.setProperty("IsPlayable", "true") item.setProperty('songid', str(songid)) @@ -766,7 +766,7 @@ class Grooveshark: album = song[2] artist = song[4] coverart = song[6] - item = self.songItem(songid, name, album, artist, coverart, trackLabelFormat) + item = self.songItem(songid, name, album, artist, coverart, trackLabelFormat, (n+1)) if item != None: coverart = item.getProperty('coverart') songname = song[0]