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)
评论列表
文章目录