[PATCH] IDLE Action (Update Library, Shutdown, Execute Custom Built-in Command, etc.)
#1
Lightbulb 
On Idle Do Action
-> Shutdown ( Executes the default shutdown action )
-> Update Library ( already feature request for updating on interval )
-> idle.py

It will automatically execute wakup.py when it comes back from idle.

Their was already feature similar "Run Program on Screensaver Start/Stop" but it is waiting for developer approval ..
http://trac.xbmc.org/ticket/5601

GUI Screenshot:
http://trac.xbmc.org/attachment/ticket/5...shotv2.JPG

Patch:
http://trac.xbmc.org/attachment/ticket/5...ion2.patch

In linux, to apply patch:
patch -p0 < idle_action_version2.patch

Trac ( Updated with new GUI Layout and Screenshot with new patch)

http://trac.xbmc.org/ticket/5969
Reply
#2
no developer, but this could be useful.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#3
I am still trying to decide where the option will go on the GUI ? Any input plz ?

I see that Screensaver has it's own timer so I don't think merging it with the system one is a good idea ?
Reply
#4
Cool idea.

Even though screensaver has its own timer, i think system is probably the best place....It's gotta be either that or appearance I think, unless you split it up into multiple locations, since I suppose there's no reason it couldn't perform more than one of those things (ie, it could theoretically go to screen saver, update the library, and launch a python script all when its been idle for x amount of time.) Or it could just do one, or none of the above.
Reply
#5
+1 on this... When I run a python script with a sleep loop, xbmc locks up when I try to shutdown. This would be very helpful
Reply
#6
Just as a side note please handle the gui entries with care. Less is sometime more. IMO the best place would be the system tab.
As coding rule please don't spread system calls and hiding XBMC code all over the place if possible. Use util functions where applicable. Take CWIN32Util::XBMCShellExecute as an example. Use it or create you own. Linux/Mac might have similar functions.
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.
Reply
#7
I will probably reuse the code that is in XBMC.AlarmClock().

It uses CUtil::ExecBuiltIn(const CStdString& execString) to excute it's action. As you probably noticed some of actions I listed as are alreay defined inside their .

Maybe instead of executing a script, I execute an action like XBMC.AlarmClock ? This action can be runscript as well ..

Again this code will be written as wrapper around existing funtionality and hence will work with all OS that xbmc supports.
Reply
#8
That sounds good.
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.
Reply
#9
Added Gui Screenshots ..
Reply
#10
Added Patch for feature. Works in Linux and Windows, Looking for more tester before I submit a trac ?
Reply
#11
trac it and you will get testers Wink
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not PM or e-mail Team-Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#12
Added to trac ( http://trac.xbmc.org/ticket/5969 )
Reply
#13
I'd love to have XBMC to automatically update my library every time it idles. Nice idea. I'm trying (and failing) to do the same in a script right now.
Reply
#14
Added new GUI Layout and Screenshot with patch to trac.
Reply
#15
Will this nice feature integrated in XBMC? Can't find it in Dharma 10.
Reply

Logout Mark Read Team Forum Stats Members Help
[PATCH] IDLE Action (Update Library, Shutdown, Execute Custom Built-in Command, etc.)1