blinkseb Wrote:No, it's not available on Dharma, it wasn't backported
so if we downloaded the latest how would we implements this?
lophie
Junior Member Posts: 12 Joined: Feb 2011 Reputation: 0 |
2011-02-24 22:39
Post: #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? |
| find quote |
V-Turn
Member Posts: 99 Joined: Oct 2004 Reputation: 6 |
2011-03-01 01:13
Post: #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 startsand myscript.py is located in /home/user/.xbmc/scripts Hope that helps. V. |
| find quote |
Joerg.Liebner
Junior Member Posts: 4 Joined: Feb 2011 Reputation: 0 |
2011-03-16 16:51
Post: #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?
|
| find quote |
spiff
Grumpy Bastard Developer Joined: Nov 2003 Reputation: 82 |
2011-03-16 16:56
Post: #14
you understand exactly everything wrong
![]() services are in master, autoexec.py is gone in master, autoexec.py still works in dharma. 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. |
| find quote |
cbull
Junior Member Posts: 1 Joined: Apr 2011 Reputation: 0 |
2011-04-26 18:45
Post: #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) |
| find quote |
malte
Skilled Python Coder Posts: 1,186 Joined: Jan 2010 Reputation: 21 Location: Germany |
2011-06-02 11:38
Post: #16
I am using autoexec.py in Rom Collection Browser in two scenarios:
- relaunching RCB when emulator is used in solo mode (quit XBMC -> start emu -> play game -> quit emu -> start XBMC -> launch RCB) - start scraping games at XBMC startup (background scraping while watching movies etc.) What is the suggested way to get this working with the new service mechanism? 1. Add extension point "xbmc.service" to the original addon pointing to a little startup module that checks what to do (do nothing, launch RCB or start scraping) 2. Add one or two additional service addons that perform the tasks. In this case: How do I enable/disable a service from python code? Edit: Nevermind, I decided to go with the second option.
(This post was last modified: 2011-06-03 20:32 by malte.)
|
| find quote |
vikjon0
--- Posts: 2,430 Joined: Apr 2009 Reputation: 7 Location: Sweden |
2011-06-04 13:50
Post: #17
Quote:What is the suggested way to get this working with the new service mechanism?I am also interested in best practise for this situation. |
| find quote |
malte
Skilled Python Coder Posts: 1,186 Joined: Jan 2010 Reputation: 21 Location: Germany |
2011-06-07 07:23
Post: #18
Not sure, if this is the official way, but I did it like this and it was accepted to go into the repo:
- In main addon write a setting with the action for the service - On XBMC startup the service checks the setting and disables the setting again - The service does its job Example service code is here. |
| find quote |
Steve Evans
Junior Member Posts: 20 Joined: Dec 2010 Reputation: 0 |
2011-09-06 21:05
Post: #19
I've followed the guidance at http://wiki.xbmc.org/index.php?title=HOW...g_services and have an issue using an autologout service started at login.
Before explaining the issue, see the script shown below for reference. addon.xml: Code: <?xml version="1.0" encoding="UTF-8" standalone="yes"?>default.py: Code: import xbmc,timeI use profiles to manage who gets to watch what, and also have assigned the red button on my remote to logout by tweaking .xbmc/userdata/keymaps/remote.xml by adding the following. Code: <red>System.LogOff</red>Should I forget to hit the red button after viewing something I don't want the kids watching, the above script will log off automatically after 5 minutes on inactivity. Everything appears OK, however, should I remember to log off, this script, launched at logon, isn't terminated. If I log into and out of a few profiles, several copies of the script end up running at the same time, evidenced by the following appearing in the log 5 minutes later: Code: 19:48:41 T:3069180784 NOTICE: autologout: Logging offIn the above example there were clearly three copies of the script still running. So, my question is, how should service scripts started at login be terminated? Steve |
| find quote |
paddycarey
Senior Member Joined: Sep 2009 Reputation: 8 |
2011-09-26 04:45
Post: #20
Is there a way to pass an argument to my script at startup using this method?
|
| find quote |