Hey guys,
I just got something working. Maybe you can have a look at it and see if it works for you. It's very minimal, but it works.
Here are some notes concerning the patch:
In video window, add a new path "python://<pathtoscript>", for example "python://e/apps/xbmc/scripts/test.py". Parameters are passed like this: "python://<pathtoscript>?option1=val1&option2=val2". PythonDirectory.cpp uses a static map that maps handles it gives out to python scripts to instances of virtualpythondirectory. I added two methods to xbmcmodule in libPython which receive those handles and get the appropriate instance of pythondirectory and add the list items to the stored list.
The python script receives the following information via agv[]:
argv[0]=its own script path in a format like in the python urls: e/apps/xbmc/scripts/test.py.
argv[1]=handle to pass to the python functions setDirectoryEntry and endOfDirectory.
argv[2]=parameter string passed via python url in the format ?parm=value
What needs to be done:
Something security should be added to the getHandle function and the xbmcmodule functions to make them check for valid pointers.
A noob friendly python script browsing dialog in the add source dialog.
I also attached a very basic test script. Please comment on this and add it to svn when it is ready. I'm not so good at c++ yet, so please be gentle
I put a lot of hours into this, I'd like to have it in SVN as soon as possible so I can start developing scripts for this. Will somebody help me with this? I'd really appreciate this.
Sorry that this is all very unstructured, please look at the source code to understand what I did.
So here is the link to the patch:
http://www.theendofthelongestline.de/vir...older.diff
I hope it works, because I removed some lines from the patch that are specific to my system.
Here is the python script:
http://www.theendofthelongestline.de/test.py.txt
Please also review the other stuff I changed to embed the python folders. thanks!