Trying to restat a service addon after if updates
#1
Is there any way to get a service addon to restart its self when the addon manager detects and downloads an update?
Reply
#2
as far as i know, this is not implemented yet.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
(2013-01-13, 05:02)ronie Wrote: as far as i know, this is not implemented yet.

Yeah only way I can think to do it is have a getsettings command in my while loop for the service and have the service restart if the setting changes. Just trying to work out how to get it not to stop the service the first time the plugin is installed and ran. Might have it also check if a config file exists. Wish the addon manager was more configurable. Would love to be able to have an architecture tag in my addon.xml so I didn't need to have different arch specific repos.
Reply
#4
i'd say this should work:
Code:
<extension point="xbmc.service"
library_linux="foo.py"
library_osx="bar.py"
library_android="foobar.py"
start="login"/>

or detect the platform within your addon:
Code:
def get_platform():
  if xbmc.getCondVisibility('system.platform.osx'):
    platform = "osx"
  elif xbmc.getCondVisibility('system.platform.windows'):
    platform = "win32"
  elif  xbmc.getCondVisibility('system.platform.ios'):
    platform = "ios"
  else:
    platform = "linux"
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#5
(2013-01-13, 05:41)ronie Wrote: i'd say this should work:
Code:
<extension point="xbmc.service"
library_linux="foo.py"
library_osx="bar.py"
library_android="foobar.py"
start="login"/>

or detect the platform within your addon:
Code:
def get_platform():
  if xbmc.getCondVisibility('system.platform.osx'):
    platform = "osx"
  elif xbmc.getCondVisibility('system.platform.windows'):
    platform = "win32"
  elif  xbmc.getCondVisibility('system.platform.ios'):
    platform = "ios"
  else:
    platform = "linux"
What I mean by architecture is arm, i686, or x86_64. My addon is linux only. Right now I'm using python platform to detect the arch. I placed all of the different arch binaries in one folder and copy over the proper one.
Does the addon manager send any signal I could catch when a update occurs?
Reply
#6
I did it like this: https://github.com/queeup/service.inadyn...ice.py#L30
Reply
#7
restart on update should be fixed now:
2069 (PR)
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#8
Thats good news. Finally got it working last night guess I'll revert my changes after frodo-final releases as this is a much cleaner solution. Thanks for all the help and suggestions.
Reply

Logout Mark Read Team Forum Stats Members Help
Trying to restat a service addon after if updates0