<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Oct 7, 2014 at 3:59 AM, Robin Hill <span dir="ltr">&lt;<a href="mailto:myth@robinhill.me.uk" target="_blank">myth@robinhill.me.uk</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">[snip]</span></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I don&#39;t think this will do what you think it will. You&#39;re asking it to<br>
record where there&#39;s a program on in that time range (or at that time)<br>
which isn&#39;t called &#39;CTV News&#39;, rather than if there&#39;s not a program on<br>
in that time range called &#39;CTV News&#39; (i.e. if there&#39;s any other show on<br>
that channel in the specified time range then it will record, regardless<br>
of whether CTV News is also on).<br>
<br>
I&#39;d use a not exists rule instead. Lose the additional table detail and<br>
specify it all in the query - e.g.:<br>
<span class=""><br>
    program.title = &#39;Evening News&#39; AND<br>
    HOUR(CONVERT_TZ(program.starttime,&#39;Etc/UTC&#39;, &#39;SYSTEM&#39;)) = 18 AND<br>
</span>    NOT EXISTS (<br>
        select 1 from program pother<br>
        where pother.chanid=1662<br>
        AND pother.starttime = program.starttime<br>
        AND pother.title LIKE &#39;CTV NEWS%&#39;<br>
    )<br>
<br>
You may need to tweak the start times if they&#39;re not definitely 6PM (or<br>
not necessarily the same).<br>
<br>
I&#39;ve not tested this, but if MythTV is just throwing this into a<br>
standard SQL where clause then I don&#39;t see why it shouldn&#39;t work.<br></blockquote></div><br></div><div class="gmail_extra">Just created the rule and Evening News is recording on the next 2 Sundays when CTV is preempted by NFL Football.<br><br></div><div class="gmail_extra">Working like a charm so far. Thanks.<br></div></div>