[mythtv-users] Conditional custom recording rule

Nicolas Krzywinski myth at site7even.de
Mon Oct 6 23:28:33 UTC 2014



Am 2014-10-06 23:37, schrieb mythtv-users-request at mythtv.org:
> Message: 18
> Date: Mon, 6 Oct 2014 15:36:44 -0600
> From: John P Poet <jppoet at gmail.com>
> To: Discussion about MythTV <mythtv-users at mythtv.org>
> Subject: Re: [mythtv-users] Conditional custom recording rule
> Message-ID:
> 	<CACSqvJkhM_fJsMXQ4HeZS+Fthd3vwohQhXdP3EAO6GDBc3aoUQ at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> 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).
>
> John
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> 
> <http://www.mythtv.org/pipermail/mythtv-users/attachments/20141006/2b948262/attachment.html>
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: Fallback-recording.jpg
> Type: image/jpeg
> Size: 25698 bytes
> Desc: not available
> URL:
> 
> <http://www.mythtv.org/pipermail/mythtv-users/attachments/20141006/2b948262/attachment.jpg>
Thanks for this post John, as I learned a lot from it.

First, now I understand the additional tables box within the recording 
rule mask. SQLly spoken, the "additional tables" box content is appended 
to the tables expression of the sql query and because of this, there is 
a comma in front, right?

Second, I have to assume - due to my lack of deeper knowledge at this 
point - that multiple sql table aliases to the same table can be used 
like different tables. At least this is my understanding of why we can 
use the program table doubled - one as original program table and the 
same one aliased as pother.

Third, after thinking a quite amount of times about your example, I 
guess now I finally understand it - which leads me to a final question:
pother.starttime has to exactly match program.starttime, so if the 
alternative news would not exactly start at the same time, this has to 
be extended, correct?

As mentioned earlier, this really is an awesome example of what MythTV 
is able to do!

Thanks,
Nicolas


More information about the mythtv-users mailing list