2007-08-20, 06:47
Hi All,
Thanks to the hard work of Umbehagen and Nuka1195 and myself, we now have plugin python directories available within the XBMC GUI as additional "Sources".
This allows your media-type scripts to incorporate in a more seamless way with XBMC's views - no need to develop a script that needs to be skinned to look seamless
First off, you need latest SVN - revision 10008 or newer.
Then you need some plugins, or to write your own. Nuka1195 has kindly made a preliminary version of the Apple Movie Trailers plugin available - you can grab it here:
http://www.xboxmediacenter.com/upload/Ap...Plugin.rar
He's also updated the python docs including the new plugin module which (currently) contains 3 functions here:
http://www.xboxmediacenter.com/upload/Python Docs.rar
You throw these plugins in Q:\plugins\<type of media>\ in the usual directory structure for scripts (i.e. <scriptname>\default.py). Once a user has (say) a video plugin, the "Video Plugins" source will be available via the Add Source dialog - they can ofcourse browse down from there and add a particular plugin (or a subfolder of a plugin).
The interface is pretty simple:
You have a script that takes in some arguments. The first is the base path of the URL that is being browsed by the user. The second is a handle to the directory class that is requesting the directory, and the last is the URL options that are either blank, or are something that you have filled in on a previous directory fetch.
You then generate some listitems based on these arguments and send them to XBMC via the addDirectoryItem() function.
Once you are done, you can (optionally) add some sortmethods (via addSortMethod), and lastly call endDirectory() with a boolean parameter of success or failure.
XBMC then formats your items up and displays them in the list, just like any other folder (local, smb, replaytv, musiclibrary etc.).
For reference, the development thread is here:
http://forum.xbmc.org/showthread.php?tid=27760
That's all for now. There's still more things we have planned for this, and we'll continue discussion of that in this thread.
Cheers,
Jonathan
Thanks to the hard work of Umbehagen and Nuka1195 and myself, we now have plugin python directories available within the XBMC GUI as additional "Sources".
This allows your media-type scripts to incorporate in a more seamless way with XBMC's views - no need to develop a script that needs to be skinned to look seamless
First off, you need latest SVN - revision 10008 or newer.
Then you need some plugins, or to write your own. Nuka1195 has kindly made a preliminary version of the Apple Movie Trailers plugin available - you can grab it here:
http://www.xboxmediacenter.com/upload/Ap...Plugin.rar
He's also updated the python docs including the new plugin module which (currently) contains 3 functions here:
http://www.xboxmediacenter.com/upload/Python Docs.rar
You throw these plugins in Q:\plugins\<type of media>\ in the usual directory structure for scripts (i.e. <scriptname>\default.py). Once a user has (say) a video plugin, the "Video Plugins" source will be available via the Add Source dialog - they can ofcourse browse down from there and add a particular plugin (or a subfolder of a plugin).
The interface is pretty simple:
You have a script that takes in some arguments. The first is the base path of the URL that is being browsed by the user. The second is a handle to the directory class that is requesting the directory, and the last is the URL options that are either blank, or are something that you have filled in on a previous directory fetch.
You then generate some listitems based on these arguments and send them to XBMC via the addDirectoryItem() function.
Once you are done, you can (optionally) add some sortmethods (via addSortMethod), and lastly call endDirectory() with a boolean parameter of success or failure.
XBMC then formats your items up and displays them in the list, just like any other folder (local, smb, replaytv, musiclibrary etc.).
For reference, the development thread is here:
http://forum.xbmc.org/showthread.php?tid=27760
That's all for now. There's still more things we have planned for this, and we'll continue discussion of that in this thread.
Cheers,
Jonathan