Kodi Community Forum

Full Version: How can I stop a startup service without restarting kodi?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

Let me explain:

I have an addon that in its addon.xml there is this startup service definition:
Code:
<extension point="xbmc.service" library="service.py" start="startup"/>

The simple way is removing the 'startup' attribute, or all the 'extension'.
Save it, Restrat Kodi.
So in the next time this service won't run.

But what I need is to stop this service without do this manual way with restarting kodi.

* BTW, Does stop script should help here? Because I tried and it didn't stop the service.
Code:
xbmc.executebuiltin("StopScript(%s)" % addon)

Is it possible?
Thanks.
Assuming the script doesn't have some other component you need besides the service, you can disable the addon. That will stop the service without having to restart Kodi.
Thanks
@pkscout 

I will give more details:

Addon1 is import Addon2 (Which defines in Addon1 -> addon.xml)
Addon2 is running as a startup service (Which defines in Addon2 -> addon.xml)

My purpose is to delete Addon2 directory from "Addons" directory.
But currently when I do that, Addon2 is installing itself (probably because it's still running in the background), so its directory is shown again in "Addons".

1) I tried manually removing the 'import' from Addon1 xml and the 'service' definition from Addon2 xml - It's still the same, unless I restarting kodi.
- Is there any way to make kodi restart a specific addon so it will reload the edited addon.xml?

2) I tried to disable Addon2 by editing directly the "enabled" column in "installed" table in "AddonsXX.db", but it doesn't actually disable and stop the service.
But when I disable from inside kodi with the Addon Information window, it does stop the service.
So what is the difference? What should I need to do to make it disabled after changing the value in the DB? (Or there is another command to do that?)
Is there any way to make kodi to "reload" the DB after changing it?

3) I also tried adding the Addon2 to the blacklist table in "AddonsXX.db"
But it also will help only from the next startup of kodi.
Without more specifics (like actual addon names) I probably can't say anymore than to say that if an addon is importing another addon, then you can't disable or delete the second addon.
This is not a problem to remove the import, but it still requires to restart kodi.
So one of my question above was if there is any way to restart an addon after editing the addon.xml (Without restarting kodi)

And I'm asking in general for any addon that has this case.