def AddAudioEntry(self, a):
title = a.get("artist")
if title:
title += u" : "
title += a.get("title")
d = unicode(datetime.timedelta(seconds=int(a["duration"])))
listTitle = d + u" - " + title
listitem = xbmcgui.ListItem(PrepareString(listTitle))
xbmc.log(str(a),xbmc.LOGDEBUG)
listitem.setInfo(type='Music', infoLabels={'title': a.get("title") or "",
'artist': a.get("artist") or "",
'album': a.get("artist") or "",
'duration': a.get('duration') or 0})
listitem.setProperty('mimetype', 'audio/mpeg')
xbmcplugin.addDirectoryItem(self.handle, a["url"], listitem, False)
评论列表
文章目录