Kodi Community Forum
Is it possible to start a service from an addon? - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
+--- Thread: Is it possible to start a service from an addon? (/showthread.php?tid=186036)



Is it possible to start a service from an addon? - Karnagious - 2014-02-12

My addon is a service and an addon, so there is a default.py and service.py. The default.py could do with a way to start the service.py if it isnt running.

Using RunScript(addonid) doesnt work as the default.py gets launched. Also, RunScript(service.py) results in an access error.

Anyone know of a workaround?

Thanks,


RE: Is it possible to start a service from an addon? - el_Paraguayo - 2014-02-12

How about setting your service to run all the time but only do something when a certain skin setting is set to true, you could then toggle that setting from your addon.

Similar principle to what's suggested here.

Just an idea.


RE: Is it possible to start a service from an addon? - Karnagious - 2014-02-12

Thanks el_P, that's what it is set to do already, but the situation I am looking to cover is when the service is disabled (due to a script error or the user stops it) and then someone runs the Addon.

It would also help with testing, as restarting XBMC or manually restarting the script is a bit of a pain when have to do it 100 times an hour.