[EMAIL PROTECTED] wrote:
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.

That could work, but it's a bit expensive and inelegant.

If it were possible to run a shell script when a recording starts and ends, the end script could use your method to check if there is an imminent recording and not restart Athcool if there is, that would fix the potential race condition you highlighted.

--
tveeprom: Hauppauge: model = 34132, rev = J158,
tveeprom: tuner = Philips FM1236 MK3 (idx = 58, type = 4)
tveeprom: audio_processor = MSP3416 (type = 14)
(new type Model 401)
model name      : mobile AMD Athlon(tm) XP Processor
cpu MHz         : 2277.214
cache size      : 512 KB
(Plenty o' grunt on an ECS k7s5a MB)
Knoppmyth R5A16 (unmodified)
http://mysettopbox.tv/CHANGELOG.txt
MythTV 0.18.1
_______________________________________________
mythtv-users mailing list
[email protected]
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

Reply via email to