- def songItem(self, songid, name, album, artist, coverart, trackLabelFormat=ARTIST_ALBUM_NAME_LABEL):
- songImg = self._get_icon(coverart, 'song-' + str(songid) + "-image")
- if int(trackLabelFormat) == NAME_ALBUM_ARTIST_LABEL:
- trackLabel = name + " - " + album + " - " + artist
- else:
- trackLabel = artist + " - " + album + " - " + name
- stream = self._getSongStream(songid)
- duration = stream['duration']
- url = stream['url']
- item = xbmcgui.ListItem(label = trackLabel, thumbnailImage=songImg, iconImage=songImg)
- item.setInfo( type="music", infoLabels={ "title": name, "album": album, "artist": artist, "duration": duration} )
- item.setProperty('mimetype', 'audio/mpeg')
- item.setProperty("IsPlayable", "true")
- item.setProperty('songid', str(songid))
- item.setProperty('coverart', songImg)
- item.setProperty('title', name)
- item.setProperty('album', album)
- item.setProperty('artist', artist)
- item.setProperty('duration', str(duration))
- item.setProperty('url', str(url))
+ def songItem(self, songid, name, album, artist, coverart, trackLabelFormat=ARTIST_ALBUM_NAME_LABEL, tracknumber=1):