Overriding skin xml from addon
#1
I'm not sure if this is even possible. My searching so far is suggesting that it is not but I thought I would ask just to be sure.

I'm playing around with the Oz Weather addon and trying to add some new features. Some of them require (at this stage) altering xml files with the skin. Such as myweather.xml etc

Is there any way to do this without requiring the end user to copy modified files over the top of the originals? I come from a Joomla background where parts of the template (skin) could be overridden by modules / components (addons) by including the modified files within the module / component (addon) itself. Just wondering if something similar is possible with XBMC?
Reply
#2
You can modify XML programmatically and then call the reload function to have the changes take effect in the skin. The plugin module 'elementtree' will help to modify the XML file. It will not be as easy as working with joomla but it is possible. You'll also need to make sure that if the current skin is confluence, that you are working with a writeable copy of the skin. The techniques to do this are not officially sanctioned so if you are writing a plugin you want to make available to the public it will have to be in a private repo. If it's just for your use then of course you can do anything you want to.

Let me know if you need a few pointers to get started.

-Jerimiah
Reply
#3
Thanks jerimiah Smile

For what I am working on right now I won't be able to do that because I'm modifying an addon in the official repository and would like the changes to be included at some point.

It sounds like 'elementtree' will come in very handy for another addon I have planned. More than happy for that one to go into a private repo.

I'll start having a play with that but if I get lost I'll definately come back begging for help LOL
Reply
#4
I just noticed that in the sticky thread 'notes for add-on devs' that the elementtree module is actually depracated, but there are details on how to import it directly from python. :-)
Reply

Logout Mark Read Team Forum Stats Members Help
Overriding skin xml from addon0