Start service addon after install
#1
I am working on providing the best possible experience with service addons in openelec system. I have a possibility to start / stop service binary addon with enable / disable functionality in addon manager.

Now I would also like to get service addon started after it is installed. I know that service addon starts at XBMC start, but is it possible to get it started right after it is installed?

This is addon.xml file I use:
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="service.multimedia.hts-tvheadend"
       name="hts-tvheadend"
       version="2.0.4"
       provider-name="openelec.tv">
  <requires>
    <import addon="os.openelec.tv" version="2.0"/>
    <import addon="xbmc.python" version="2.0"/>

  </requires>
  <extension point="xbmc.service"
             library="default.py" start="startup">
        <provides>executable</provides>
  </extension>
  <extension point="xbmc.addon.metadata">
    <summary>hts-tvheadend: a TV streaming server for Linux supporting DVB-S, DVB-S2, DVB-C, DVB-T, ATSC, IPTV, and Analog video (V4L) as input sources.</summary>
    <description>
HTS-Tvheadend is a TV streaming server for Linux supporting DVB-S, DVB-S2, DVB-C, DVB-T, ATSC, IPTV, and Analog video (V4L) as input sources. It also comes with a powerful and easy to use web interface both used for configuration and day-to-day operations, such as searching the EPG and scheduling recordings. Even so, the most notable feature of Tvheadend is how easy it is to set up: Install it, navigate to the web user interface, drill into the TV adapters tab, select your current location and Tvheadend will start scanning channels and present them to you in just a few minutes. If installing as an Addon a reboot is needed
    </description>
    <platform>all</platform>
  </extension>
</addon>

I tried with both parameters in extension point start="[login|startup]" and this doesn't change anything about starting service addon after install.

Would it be possible to add two additional parameters in extension point to enable startup of service addon at install and to restart service addon at upgrade.
Reply
#2
This seems like a reasonable request for me (user installs service addon, it'll start once XBMC restarts (or login)) so seems reasonable that it should start up straight away on install.

If you want to see about it, you probably need to call ADDON::CAddonMgr::Get().StartServices() (or some variant thereof - you want to start only the new service) when the install job completes in CAddonInstaller::OnJobComplete().
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply

Logout Mark Read Team Forum Stats Members Help
Start service addon after install0