[mythtv-users] live tv & recording end events

Mark Wedel mwedel at sonic.net
Tue Sep 27 05:39:16 UTC 2016


On 09/24/16 04:39 AM, Richard Brandolino wrote:
> I had a similar issue on the IPTV encoder scripts I wrote. My answer was lock
> files and a python script to check the status of the mythtv backend for the
> device channel. A similar solution may work for you -
> https://www.mythtv.org/wiki/IPTV_Encoders_as_a_Capture_Device

  Thanks - that mythtv_encoder_status seems to do the trick.

  It seems like the livetv start & end events should work (and in fact, the end 
event is still necessary), however, those events don't expand the %CARDID% value 
like the recordingended event does - I can actually see this in my log:

/var/lib/mythtv/bin/roku_live.pl %CARDID% stop

  This seems like a bug to me, as in many cases, if livetv is ending, one 
probably wants to know on what device livetv is ending.

  I do like the mythtv_encoder_status because it makes my idle thwarter a little 
more resilient.  slingtv has some idle checking in place, and my solution is to 
send the roku periodic keypresses if recording is active.  However, with your 
script, I can actually check the roku status - if it is idle, send it back to 
the home screen, otherwise send the keypress.  Thus, if for some reason 
something fails in the recording end/putting the roku back to home screen, this 
can clean that up.

  Thanks again.



More information about the mythtv-users mailing list