2009-11-19, 23:17
I'm toying around with writing a plugin for CTV. I've read thru the wiki article on how to create plugins and it seems fairly straight forward, but I'm stuck on something that's probably really easy for someone who's done this for a while.
Most of the examples on the wiki as well as documentation about the xbmcplugin module use the sys.argv variable (I'm coming from the C++ world, so my terms might be slightly off possibly). However, according to this post (http://forum.xbmc.org/showthread.php?tid...t=sys.argv) sys.argv doesn't exist unless you start the script a specific way. I'm running XBMC with Aeon skin and I'm trying to start the script I'm working on from the Script menu item, which seems to be the way that doesn't provide me with a sys.argv variable and therefore my script keeps failing (or more correctly, the example script from the wiki).
So my question is how do I go about getting the sys.argv variable being available in my script or alternatively, what do I supply as the handle to the xbmcplugin.addDirectoryItem function if I don't use the sys.argv[1] variable?
Thanks,
Harry
Most of the examples on the wiki as well as documentation about the xbmcplugin module use the sys.argv variable (I'm coming from the C++ world, so my terms might be slightly off possibly). However, according to this post (http://forum.xbmc.org/showthread.php?tid...t=sys.argv) sys.argv doesn't exist unless you start the script a specific way. I'm running XBMC with Aeon skin and I'm trying to start the script I'm working on from the Script menu item, which seems to be the way that doesn't provide me with a sys.argv variable and therefore my script keeps failing (or more correctly, the example script from the wiki).
So my question is how do I go about getting the sys.argv variable being available in my script or alternatively, what do I supply as the handle to the xbmcplugin.addDirectoryItem function if I don't use the sys.argv[1] variable?
Thanks,
Harry