[mythtv-users] Is there an easy way to run script just after a recording finishes

Ronald Frazier ron at ronfrazier.net
Thu Jun 2 19:17:20 UTC 2011


On Mon, May 30, 2011 at 8:22 PM, Michael T. Dean
<mtdean at thirdcontact.com> wrote:
>>> I would like to lock the box during the channel
>>> change script it unlock it once the recording has finished.

>> Use the System Events subsystem to trigger the calls on recording
>> start/end.

One potential issue I can think of is a race condition when there are
2 recordings back to back. Is there any guarantee of ordering of these
myth events? Will the finished-recording event be triggered and
allowed to complete before the next recording starts and the
start-recording event is triggered? If not, then you can end up with
the situation where myth calls the channel change script before the
unlock script has completed, and thus the channel never changes. You
can work around this by making sure you unlock before changing a
channel, but then if they complete out of order, the channel change
script could unlock, change channel, and relock, and then the
finished-recording script unlocks it again a second later.

-- 
Ron Frazier


More information about the mythtv-users mailing list