[mythtv-users] live tv & recording end events

Mark Wedel mwedel at sonic.net
Sat Sep 24 05:52:44 UTC 2016


  Through a little work, I have a roku with slingtv, going to a hdmi -> 
component -> hdpvr device.  Since I already had a schedules direct account for 
OTA, I even get good guide data in mythtv for most of the channels.

  I've written up a channel change script for the roku, and scheduling and 
recording programs works just fine.

  (as a note, once I do a little more work, I'll put all this on the mythtv wiki).

  My problem is with live tv (I'm running 0.27).  I have a script run when the 
recording finished event happens.  This script returns the roku to the home 
screen so it doesn't keep streaming the TV show when I'm done watching.

  My scripts log what they are doing, so I can see what is running.  The problem 
I run into with trying to watch livetv, is that while the channel change script 
runs as expected, almost immediately after the end recording event is triggered, 
even if this is the first time I'm watching on the roku.  The script does what 
it is meant to, and puts the roku back in the home screen.

  I'm trying to think the best way to handle this.  There is the livetv started 
event (but no livetv ended event until 0.28) which I could perhaps use to set up 
additional lock files, so that the recording end event is just ignored if livetv 
is active.

  Another thought is to just ignore the recording end event if it happens within 
10 seconds (or some value) of the channel change script.  This adds some risk 
that something could just keep streaming for a long time.

  Any thoughts, or has anyone else dealt with this?


More information about the mythtv-users mailing list