2012-05-22, 22:17
Hello!
I'm developing xbmc plugin for most popular russian social network. It provides image, audio, video.
To determine context, I am using xbmcgui.getCurrentWindowId()
For some reason, it does not work if plugin is accessed via shortcut (introduced in xbmc 11).
It always jumps to Image (id == 10002)
Sources http://code.svoka.com/vk-xbmc-plugin/src....svoka.com
Is there any way to determine context if accessed by shortcut?
I'm developing xbmc plugin for most popular russian social network. It provides image, audio, video.
To determine context, I am using xbmcgui.getCurrentWindowId()
Code:
class XBMC_VK_UI_Factory:
def GetUI(self, param, api, handle):
#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: " + id
For some reason, it does not work if plugin is accessed via shortcut (introduced in xbmc 11).
It always jumps to Image (id == 10002)
Sources http://code.svoka.com/vk-xbmc-plugin/src....svoka.com
Is there any way to determine context if accessed by shortcut?