cannot change MyVideoNav view mode
#1
Hi, i am creating a plugin. I am having trouble switching view modes in MyVideoNav, when populated from python.
For testing, i run my script from
keymap.xml like this:
Code:
            <two mod="ctrl">RunScript(plugin.video.test, 0, ?mode=972)</two>

My part of addon.py looks like this:
Code:
...
if p['mode'] == 972:
        LIST_ITEM_CONTROL_ID = 50

        class TestDialog(xbmcgui.WindowXMLDialog):
            def __init__(self, strXMLname, strFallbackPath, strDefaultName, **kwargs):
                pass

            def onInit(self):        
                self.listControl = self.getControl(LIST_ITEM_CONTROL_ID)
                self.listControl.reset()

                items = []
                li = xbmcgui.ListItem('Test Item')
                items.append(li)

                self.listControl.addItems(items)

        
        ui = TestDialog("MyVideoNav.xml", '', "Default")
        ui.doModal()
...

1/ Everything works, but the view mode on left cannot be changed from 'List' to anything else. It does not matter if I fill-in the control 50 for List of 500 for thumbnail, switching wont work.
2/ Also i dont understand how should it work, if I populate the view 50, how would xbmc know to display when switched to for example thumbnailview, which is control id 500. Should I populate some other control?

If you could, please help
Reply

Logout Mark Read Team Forum Stats Members Help
cannot change MyVideoNav view mode0