default.py 文件源码

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

项目:vkkodi 作者: VkKodi 项目源码 文件源码
def GetUI(self, param, api, handle):

        content_type = param.get('content_type')
        if content_type == 'video':
            return XVKVideo(param, handle, api)
        elif content_type == 'audio':
            return XVKAudio(param, handle, api)
        elif content_type == 'image':
            return XVKImage(param, handle, api)
        #fallback if no content_type provided
        #bloody hacks http://wiki.xbmc.org/index.php?title=Window_IDs
        id = xbmcgui.getCurrentWindowId()
        if id in (10006, 10024, 10025, 10028):
            return XVKVideo(param, handle, api)
        elif id in (10005, 10500, 10501, 10502):
            return XVKAudio(param, handle, api)
        elif id in (10002,):
            return XVKImage(param, handle, api)
        else:
            print "Invalid context: " + str(id)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号