Item not clickable (addDirectoryItem)
#1
I'm trying to write my first plugin, but things are not working as I thought they would. This is part of the code I use to add items to my view:

Code:
folder = False
icon = "DefaultProgram.png"
listitem = xbmcgui.ListItem( name, iconImage=icon, thumbnailImage=thumbnail)
xbmcplugin.addDirectoryItem( handle=int( self._handle ), url=cmd, listitem=listitem, isFolder=folder, totalItems=total)

cmd contains for example: ActivateWindow(10024,"plugin://plugin.video.youtube/")

In given example it adds the item with the name YouTube and a thumbnail to the list as it should but nothing happens when I click it. I'm probably missing something, what have I done wrong?
Reply
#2
Bump... anyone? Basically what I want to do is display some items from favourites as items in a list view. I have read and listed the favourites.xml into a dialog to select and add a couple into my own xm file. I then can read my own xml file and make them show up in the list, but nothing happens when clicking on them Sad.
Reply
#3
Take a look at setPath in docs.
Reply
#4
setPath does not work.
Reply
#5
I don't think you can directly call an action like that. Create a function that calls your action if the mode param is a certain value. Then set cmd to a plugin:// url which will pass the desired mode called

Plugin://script.video.myplugin/?mode=dostuff
Reply

Logout Mark Read Team Forum Stats Members Help
Item not clickable (addDirectoryItem)0