xbmcvkui.py 文件源码

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

项目:vkkodi 作者: VkKodi 项目源码 文件源码
def Do_FRIENDS(self):
        type = self.params["type"]

        #we have 'music', 'video', 'image'
        call_params={"fields": 'uid,first_name,last_name,photo_big,nickname', "order": 'hints', "v": "5.7"}
        if type == 'music':
            call_params["fields"] += ",can_see_audio"
        resp = self.api.call('friends.get', **call_params)

        friends = resp['items']
        for friend in friends:
            if 'deactivated' in friend:
                continue
            if type == 'music' and not friend.get('can_see_audio'):
                continue
            name = "%s %s" % (friend.get('last_name'), friend.get('first_name'))
            if friend.get('nickname'):
                name += " " + friend.get('nickname')
            listItem = xbmcgui.ListItem(name, "", friend['photo_big'])
            xbmcplugin.addDirectoryItem(self.handle, self.GetURL(mode=FRIEND_ENTRY, uid=friend['id'], thumb=friend['photo_big']), listItem, True)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号