xvaudio.py 文件源码

python
阅读 17 收藏 0 点赞 0 评论 0

项目:vkkodi 作者: VkKodi 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号