Kodi Community Forum

Full Version: Addon Script Install/Uninstall/Update
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

i have just downloaded a latest build of XBMC to check out the new script addons.
Very impressed.

Just was wondering about a few things.
1) When a script is "installed", can XBMC call any .py files?
eg: install.py which i can then setup certain files/folders etc that the script needs

2) Same for uninstall, can this call eg: uninstall.py so i can undo what the install.py did before xbmc removes the script

3) How does the addon update function work?
Does it just look for a different version in the repository and then download and overwrite?
Or, is it more sophisticated?
Again, possible to allow the update to run a update.py in the script

eg:
folder structure:
dir script.youtrailer
dir resources
addon.xml
default.py
icon.png
install.py
uninstall.py
update.py

or something like that?

Thanks Big Grin

I want it so my youTrailer script can install and modify the videodialog.xml skin file to add an onlick to the trailer button and remove visibility conditions.
then reverse then when uninstalled.
Not going to allow that.

If you want better skin interaction with scripts, then we have to design things correctly from the beginning. For instance, you are providing a "trailer" script, so we'd have a common interface for trailer scripts. If the user had one installed, the button pops up. If not, it doesn't.

Cheers,
Jonatahn
the best way to get it in skin, is to have skinner want to do it, like it have been done with my logo downloader script.