2012-01-22, 16:16
hi there!
i'm enhancing my Wake-On-LAN Addon for Eden and i'd like to provide 2 options to use it:
1. autostart it with XBMC
2. launch it manually in the programs-section
i already got this to work via this code in the addon.xml:
the only problem i still have, is that the option to autostart the script with XBMC should be optional via an addon-setting. to achieve this, imho i would need the possibility to distinguish, if the script was launched during startup, or manually. i could then build the script like this:
does anybody have an idea, how i could find out the "isLaunchedAsAutostart"? or maybe there is a different, better solution to achieve what i would like to?
many thanks in advance!
i'm enhancing my Wake-On-LAN Addon for Eden and i'd like to provide 2 options to use it:
1. autostart it with XBMC
2. launch it manually in the programs-section
i already got this to work via this code in the addon.xml:
Code:
<extension point="xbmc.python.script"
library="default.py" />
<extension point="xbmc.service"
library="default.py" />
the only problem i still have, is that the option to autostart the script with XBMC should be optional via an addon-setting. to achieve this, imho i would need the possibility to distinguish, if the script was launched during startup, or manually. i could then build the script like this:
Code:
autostartSetting = settings.getSetting("autostart")
isLaunchedAsAutostart = ......
if (isLaunchedAsAutostart == True):
if (autostartSetting == True):
doTheWaktingUp...
else:
doTheWaktingUp...
does anybody have an idea, how i could find out the "isLaunchedAsAutostart"? or maybe there is a different, better solution to achieve what i would like to?
many thanks in advance!