2011-11-15, 22:33
Hi all,
I am looking for a possibility to test in a script if currently XBMC is
o playing a video
o playing music
o running a program
...short: If XBMC is currently doing anything or is idle
Background:
My HTPC is running XBMC automatically after a boot. XBMC is the frontend and MythTV my backend to record TV.
I configured my system using NVRAM to start automatically 10 minutes before the next recording is planned. The next recording will be set into NVRAM by a shutdown script and this works fine. The machine starts up and the TV show is being recorded automatically.
Now I neither want let the machine run when the recording is done (e.g. during long absence from home) nor let the machine shut down if any media is currently playing (or a program is being executed).
Thus, my idea is to determine if XBMC is currently idle and, if TRUE, shutdown the computer.
I fear I have to parse the logfile of XBMC for that... But maybe there is another possibility.
Of course: If I finished my work with that I will write an article for the wiki and provide the scripts there.
Regards,
Blacksheep
I am looking for a possibility to test in a script if currently XBMC is
o playing a video
o playing music
o running a program
...short: If XBMC is currently doing anything or is idle
Background:
My HTPC is running XBMC automatically after a boot. XBMC is the frontend and MythTV my backend to record TV.
I configured my system using NVRAM to start automatically 10 minutes before the next recording is planned. The next recording will be set into NVRAM by a shutdown script and this works fine. The machine starts up and the TV show is being recorded automatically.
Now I neither want let the machine run when the recording is done (e.g. during long absence from home) nor let the machine shut down if any media is currently playing (or a program is being executed).
Thus, my idea is to determine if XBMC is currently idle and, if TRUE, shutdown the computer.
I fear I have to parse the logfile of XBMC for that... But maybe there is another possibility.
Of course: If I finished my work with that I will write an article for the wiki and provide the scripts there.
Regards,
Blacksheep