Writing plugin, trying to populate list
#1
How do I add items to the list in program page from python? I've written my own plugin to populate the screen with items and the titles all show up in the list but when I click on them nothing happen.

Example of actions (url) for my items:
ActivateWindow(10024,"plugin://plugin.video.youtube/")
RunScript("script.forum.browser")

I've also tried to send the actions as an argument back to my script and launch them with the xbmc.executebuiltin command, but no succes, no error, nothing happens and I know from debugging that it runs the function/command.

Ex, this is the commands executed.
xbmc.executebuiltin('XBMC.ActivateWindow(10024,"plugin://plugin.video.youtube/")')
xbmc.executebuiltin('XBMC.RunScript("script.forum.browser")')

Anone? After several hours trying to find a solution I'm not far from giving up this idea about writing my own plugins for xbmc Sad
Reply
#2
please post a debug log and sample code.
Reply
#3
ppic Wrote:please post a debug log and sample code.
Thank you for your quick answere! Big Grin The plugin is based on the launcher plugun, so it's a modified version of that. The purpose of it is to work as a custum sub page. You start with adding entries from the favourites.xml to it's own xml file "subpage.xml". Then the page is populated from that file.

This is the plugin code (using executebuiltin method):
http://pastebin.com/LiwmTZqy
In function "_add_launcher" it's using this code line to add the item:
xbmcplugin.addDirectoryItem( handle=int( self._handle ), url="%s?%s" % (self._path, name), listitem=listitem, isFolder=folder, totalItems=total)

My first atempt was this code (just replace in the "_add_launcher" function and it should not run call the _run_launcher funtion when clicking an item:
xbmcplugin.addDirectoryItem( handle=int( self._handle ), url=cmd, listitem=listitem, isFolder=folder, totalItems=total)

This is the subpage.xml:
http://pastebin.com/3Jhn8E3d

This is my log file after running the plugin and clicking each of the three items generated by my plugin:
http://pastebin.com/Xa9tCqbF


Just tell me if there is anything else you need...
Thanks!
Reply

Logout Mark Read Team Forum Stats Members Help
Writing plugin, trying to populate list0