2009-12-04, 13:00
Hey guys,
I'm playing about to make myself a plugin. I'm new to it, but have been managing quite well with Voinages plugin tutorials in the wiki. The problem is, I've gone past some of that, and I'm actually really stuck for it.
The problem is I don't want to play a video or anything, I want to write to a file instead.
This is what I'm using, and the problem seems to be after this step. I'm able to list the directory well enough (Using the C path atm because otherwise XBMC was just restarting), but I don't know how to do the actual action. What i want is so that when i click on one of those links, it will call a function "WRITE()" which just writes the name to a text file.
I tried adding a mode switch into the addLink to use the elif at the bottom, but that method doesn't seem to actually call. can anyone help me with any suggestions?
Sorry if this is too vague, I've been trying all night (pathetic I know) and need sleep. I'll try to explain better later if it doesn't make any sense.
thanks
I'm playing about to make myself a plugin. I'm new to it, but have been managing quite well with Voinages plugin tutorials in the wiki. The problem is, I've gone past some of that, and I'm actually really stuck for it.
The problem is I don't want to play a video or anything, I want to write to a file instead.
Code:
def addLink(name,url,iconimage):
ok=True
liz=xbmcgui.ListItem(name, iconImage="DefaultProgram.png", thumbnailImage=iconimage)
liz.setInfo( type="Video", infoLabels={ "Title": name } )
ok=xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url="C:\\",listitem=liz)
return ok
I tried adding a mode switch into the addLink to use the elif at the bottom, but that method doesn't seem to actually call. can anyone help me with any suggestions?
Sorry if this is too vague, I've been trying all night (pathetic I know) and need sleep. I'll try to explain better later if it doesn't make any sense.
thanks