[mythtv-users] Conditional custom recording rule

Ian Evans dheianevans at gmail.com
Mon Oct 6 23:57:08 UTC 2014


On Mon, Oct 6, 2014 at 5:36 PM, John P Poet <jppoet at gmail.com> wrote:

> On Mon, Oct 6, 2014 at 2:25 PM, Ian Evans <dheianevans at gmail.com> wrote:
>
>> First off, I'd like to thank Hika, Stephen and Nicolas (and anyone else
>> who'll be jumping in) for looking at this. The fact that we can even toss
>> this around shows how great MythTV is as compared to the STBs offered by
>> the cable and sat companies.
>>
>> I guess it's really an exercise in laziness. :-) I could just have a rule
>> for the backup newscast set at a lower priority, but I like to keep my
>> conflict list free of priority conflicts (I only occasionally get them) so
>> that when I look I see the real conflict choices between two classic movies
>> or docs.
>>
>> I see here (http://www.mythtv.org/wiki/Custom_Recording) that nested
>> selects work. But do if/then/else phrases?
>>
>> This is not valid sql or mythtv obviously but the logic might be:
>>
>> IF (select title='CTV News' and time='6pm') = 0 THEN schedule Global News
>> at 6pm
>>
>
> You can create a Custom Record Rule which uses multiple references to
> programs.  The 'Additional Tables' just needs filled in to let it know that
> you want to base your rule off of another "program".  See the attached
> screenshot for an example (hopefully you can read it, since I had to save
> it at an extremely low quality).
>
>
>
Thanks for this example. Just wanted to clarify what is in the additional
tables field. I'm seeing ', program pother'. That is COMMA program SPACE
pother

Is that right? My SQL ended up being:

program.title LIKE 'Evening News%' AND
HOUR(CONVERT_TZ(program.starttime,'Etc/UTC', 'SYSTEM')) = 18 AND
pother.chanid=1662 AND pother.starttime = program.starttime AND
pother.title NOT LIKE 'CTV NEWS%'

The rule didn't work, sadly, there's no 6pm CTV news next Sunday, so I'm
thinking I did the additional table line incorrectly. Also...is
pother.chanid supposed to be the channel of the USUAL news or the BACKUP? I
did it for the usual recording.

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20141006/8fc8ce21/attachment.html>


More information about the mythtv-users mailing list