[mythtv-users] Stop / Start Athcool just Befor / After a Recording

chris at cpr.homelinux.net chris at cpr.homelinux.net
Tue Nov 22 09:21:02 EST 2005


On Tue, Nov 22, 2005 at 04:08:29PM +0800, Bob wrote:
> Is there a way to run a script just before a recording starts and 
> another after it ends, ideally this would be specific to a capture 
> source as my next card (PVR 500) may not have this issue?

I don't know how to trigger scripts when a recording starts, and 
managing sequential recordings would be a problem because you could end 
up with a race condition. It would be easier to use a cron job that 
parses http://localhost:6544/xml once per minute and looks for the 
appropriate tuner status:

$ lynx -dump http://localhost:6544/xml | head -n 5
<!DOCTYPE Status>
<Status version="0.18.1.20050510-1" protoVer="15" time="6:15 AM" 
date="11/22/2005" >
<Encoders count="1" >
<Encoder local="1" connected="1" id="1" state="0" lowOnFreeSpace="0" 
hostname="linuxbox" />
</Encoders>

You would want to look for the appropriate "Encoder" record and toggle
the external program based on the state field.

-- 
Joke template: Three guys walk into a bar. One of them is a wee bit
stupid, and the whole scene unfolds with a tedious inevitability.


More information about the mythtv-users mailing list