Kodi Community Forum

Full Version: Add-on not refreshing after code changes??
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all,

I'm using RasPi OpenELEC v3.2.4 with XBMC Frodo.
I do my add-on development/modifications on a MacAir Mavericks with XBMC Gotham.

Yesterday I made a few changes to an add-on (Sickbeard XBMC). I added new categories and options to the add-on's settings page, and also added new functionality to the actual add-on.
I did all this on my Mac. On the Mac, with every save to the code, I can immediately see the changes in XBMC and the add-on itself.

However, when I copied the files to my Pi, nothing happened! The add-on functions and looks exactly the same as before. To be clear, I went so far as to delete the plugin's folder (/storage/.xbmc/addons/plugin.program.sickbeard/) - and the plugin still works.

This must mean there's a cache system at play here, although the plugin's addon.xml doesn't require the Common Plugin Cache at all. Still, I tried to rename /storage/.xbmc/temp/commoncache.db, still with no luck.

Could this plugin in fact "exist" somewhere else other than XBMC's add-on folder? To be clear, I'm sure that /storage/.xbmc/addons/ is in fact my RasPi XBMC's add-on folder, since I've made changes to a skin that resides there, and they took effect with no problem.

Anyone know that the hell is going onHuh
bump...
It is a bit unclear to me if you uninstalled the add-on from the pi XBMC installation or not.

It is also not clear if you updated the version number, and if you cleared the package cache
Hi Kib, thanks for your reply.

(2013-12-23, 10:02)Kib Wrote: [ -> ]It is a bit unclear to me if you uninstalled the add-on from the pi XBMC installation or not.
I have not uninstalled the add-on on the pi installation. Instead, I copied the new code and replaced the stable code in /storage/.xbmc/addons/plugin.program.sickbeard/ with my own code.

(2013-12-23, 10:02)Kib Wrote: [ -> ]It is also not clear if you updated the version number, and if you cleared the package cache
What do you mean by updating version number? Do you mean in the settings.xml file? If so, then no I did not.
I don't know how to clear a package's cache... been looking in the Wiki and Google'd but can't find anything. Tried to remove /storage/.xbmc/temp/commoncache.db but that didn't help.

Let me say that when trying to modify a skin's code (one that also lives in /storage/.xbmc/addons/), I did the same exact thing - just replaced the stable code with my own - and the changes were reflected immediately.
Addons are written in python code which is compiled while running it. You need to at least stop and start the addon completely - best way is to restart XBMC - or otherwise you will not see any changes.

Skins use XML files which can be reloaded by binding a key - totally different situation. While skinning I would suggest to not presume everything is reloaded automatically because it is not.
(2013-12-23, 13:05)Kib Wrote: [ -> ]Addons are written in python code which is compiled while running it. You need to at least stop and start the addon completely - best way is to restart XBMC - or otherwise you will not see any changes.

I've already tried restarting XBMC - to my understanding this should have done the trick.
It has not...

btw - when I was working on the code in my other machine - the changes were reflected without any need for a restart of any kind. eg. once I added a new category to the settings.xml file, hit save and re-entered the add-on settings - the new category was there.
Try removing the addons#.db
(2013-12-23, 18:55)uNiversal Wrote: [ -> ]Try removing the addons#.db

Hi uNiversal, thanks for the help.
I did the following:
Code:
:~# mv .xbmc/userdata/Database/Addons15.db .xbmc/userdata/Database/Addons15.db.backup
:~# mv .xbmc/addons/plugin.program.sickbeard .xbmc/addons/plugin.program.sickbeard-stable
:~# mv downloads/sickbeard-xbmc-new .xbmc/addons/
:~# mv .xbmc/addons/sickbeard-xbmc-new .xbmc/addons/plugin.program.sickbeard
Restarted.

The Addons15.db was recreated after the restart.
The add-on still looks the same (as in the stable branch)!

What the hell is going on? Huh
(2013-12-23, 10:02)Kib Wrote: [ -> ]It is also not clear if you updated the version number, and if you cleared the package cache

Hi Kib,
Can you explain what you mean by these two suggestions:
1. How is the version number related (I'm asuming you mean the version in addon.xml)? Could this be preventing a "refresh" somewhere in the system?
2. Is the cache cleared after a restart, or do I need to do something else? Does it also apply to the OpenELEC, or does it use another caching method?
if you change the .py file it should be recompiled on next run of that script no matter what.
no idea why it doesn't do that.