Forget autoexec.py: the right way to automatically starts addons
#1
In Eden, the autoexec.py file won't be needed anymore, thanks to the new extension point 'xbmc.service'.

A service is an addon started with xbmc. You'll find more informations about these on the wiki, http://wiki.xbmc.org/index.php?title=HOW...g_services
AndroIRC - Best IRC client for Android!
Reply
#2
This is cool. Will an addon developer be able to add a service programatically? Having an addon entry is nice and all, but will I be able to allow control of it being enabled/disabled through my addons settings?
Reply
#3
of course, it's just like any other add-on. disable it and it won't start...
Reply
#4
This says that the autoexec.py will be obsolete : does anybody know if this means it won't be used at all anymore? Probably many people are using it right now (myself at least), so it would be difficult to require every hack to be converted to addons. (Just my 0.02€Wink

V.
Reply
#5
it is a good idea, and keeping the autoexec.py seems to me a good idea too. Too many times when a new XBMC version is released, backwrd compatilbility is not made. I think it is sad and it adds the feeling that addons are not reliable...

Anyway keep going the good job !

Maybe a kind of feature request... It has been a while we have autoexec.py to run scripts at XBMC startup, what about a special script (or extension point) to do some job at XBMC "off time" (when XBMC close). It can be helpfull to stop home made python servers properly, or send messages to listening clients, or even cleanup some temporary files that an addon may have write anywhere...
Reply
#6
solexalex Wrote:it is a good idea, and keeping the autoexec.py seems to me a good idea too. Too many times when a new XBMC version is released, backwrd compatilbility is not made. I think it is sad and it adds the feeling that addons are not reliable...

Anyway keep going the good job !

Maybe a kind of feature request... It has been a while we have autoexec.py to run scripts at XBMC startup, what about a special script (or extension point) to do some job at XBMC "off time" (when XBMC close). It can be helpfull to stop home made python servers properly, or send messages to listening clients, or even cleanup some temporary files that an addon may have write anywhere...

xbmc.abortRequested is set to true when XBMC is closed. Moreover, you can already listen for a json announcement telling you xbmc is closing.
AndroIRC - Best IRC client for Android!
Reply
#7
oh ! OK for xbmc.abortRequested ! I didn't noticed !
Thanks (and sorry for being a little "off topic")
Reply
#8
This is not available in Dharma? I am only asking because the autoexec.py wiki page have been removed already....
Reply
#9
Yes is it available in dharma I'm trying to implement this yet no clue how Sad
Reply
#10
No, it's not available on Dharma, it wasn't backported
AndroIRC - Best IRC client for Android!
Reply
#11
blinkseb Wrote:No, it's not available on Dharma, it wasn't backported

so if we downloaded the latest how would we implements this?
Reply
#12
lophie Wrote:so if we downloaded the latest how would we implements this?

Here is what I have (XBMC 10.0 "Dharma") on Ubuntu: /home/user/.xbmc/userdata/autoexec.py
Code:
## auto execute scripts when xbmc starts
## note:- use only one script at a time which asks for user input!

import os, xbmc

# create playlists from iTunes playlist file
print "running autoexec.py"
xbmc.executescript('special://home/scripts/myscript.py')
print "finished autoexec.py"

and myscript.py is located in /home/user/.xbmc/scripts

Hope that helps.

V.
Reply
#13
Do i understand this right? autoexec.py is gone, service has not yet come, so there is no mechanism for autostart at the moment?
Reply
#14
you understand exactly everything wrong Smile

services are in master, autoexec.py is gone in master, autoexec.py still works in dharma.
Reply
#15
The Wiki page is very misleading, as it suggests that xbmc.service is available in Dharma.

http://wiki.xbmc.org/index.php?title=Add...elopement)
Reply
 
Thread Rating:
  • 2 Vote(s) - 5 Average



Logout Mark Read Team Forum Stats Members Help
Forget autoexec.py: the right way to automatically starts addons52