2012-05-08, 05:22
With my Add-on:XSqueeze (wiki), I have a need to embed a plugin.
Well, put better, I want to embed a plugin (for choosing music for playback inside XSqueeze), so that I can use the simple XBMC plugin structure and thus get views, lists etc. 'for free' without implementing all this stuff in a WindowXML which seems like a lot more work...
Is it possible to put a plugin inside a script at all? I.e. instantiate one directly in the script...such that one has access to the script AND plugin code at once, if you see what I mean.
Obviously one can call the plugin like any other, but then I have no access to the script's scope/classes, and would like if possible to reduce code duplication as I have a need for a lot of the stuff in the main addon when I call the script.
Hopefully this is clear enough & makes sense...basically, I need an easy way of building lists (of names with pictures) and getting the selections, which then trigger actions on an external server program...this seems pretty easy to do in a plugin as the list stuff is all taken care of...or is there a really easy way to do such a list with WindowXML I am missing - my early experiements have not been successful, I can get items to show, but only the focussed item at any one time, and one doesn't get the standard views etc.
Advice very much appreciated!!
Well, put better, I want to embed a plugin (for choosing music for playback inside XSqueeze), so that I can use the simple XBMC plugin structure and thus get views, lists etc. 'for free' without implementing all this stuff in a WindowXML which seems like a lot more work...
Is it possible to put a plugin inside a script at all? I.e. instantiate one directly in the script...such that one has access to the script AND plugin code at once, if you see what I mean.
Obviously one can call the plugin like any other, but then I have no access to the script's scope/classes, and would like if possible to reduce code duplication as I have a need for a lot of the stuff in the main addon when I call the script.
Hopefully this is clear enough & makes sense...basically, I need an easy way of building lists (of names with pictures) and getting the selections, which then trigger actions on an external server program...this seems pretty easy to do in a plugin as the list stuff is all taken care of...or is there a really easy way to do such a list with WindowXML I am missing - my early experiements have not been successful, I can get items to show, but only the focussed item at any one time, and one doesn't get the standard views etc.
Advice very much appreciated!!