<div dir="ltr">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 - <a href="https://www.mythtv.org/wiki/IPTV_Encoders_as_a_Capture_Device">https://www.mythtv.org/wiki/IPTV_Encoders_as_a_Capture_Device</a><br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Sep 24, 2016 at 12:52 AM, Mark Wedel <span dir="ltr"><<a href="mailto:mwedel@sonic.net" target="_blank">mwedel@sonic.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
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.<br>
<br>
I've written up a channel change script for the roku, and scheduling and recording programs works just fine.<br>
<br>
(as a note, once I do a little more work, I'll put all this on the mythtv wiki).<br>
<br>
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.<br>
<br>
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.<br>
<br>
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.<br>
<br>
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.<br>
<br>
Any thoughts, or has anyone else dealt with this?<br>
______________________________<wbr>_________________<br>
mythtv-users mailing list<br>
<a href="mailto:mythtv-users@mythtv.org" target="_blank">mythtv-users@mythtv.org</a><br>
<a href="http://lists.mythtv.org/mailman/listinfo/mythtv-users" rel="noreferrer" target="_blank">http://lists.mythtv.org/mailma<wbr>n/listinfo/mythtv-users</a><br>
<a href="http://wiki.mythtv.org/Mailing_List_etiquette" rel="noreferrer" target="_blank">http://wiki.mythtv.org/Mailing<wbr>_List_etiquette</a><br>
MythTV Forums: <a href="https://forum.mythtv.org" rel="noreferrer" target="_blank">https://forum.mythtv.org</a><br>
</blockquote></div><br></div></div>