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