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:
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))
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]