[mythtv-users] Conditional custom recording rule

Hika van den Hoven hikavdh at gmail.com
Mon Oct 6 20:52:48 UTC 2014


Hoi Ian,

Monday, October 6, 2014, 10:25:26 PM, you wrote:

> On Mon, Oct 6, 2014 at 1:51 PM, Hika van den Hoven <hikavdh at gmail.com>wrote:

> [snip]

 >>> Another thought. Keep your normal rule for ctv news in place and add
 >>> another rule that records one show daily at 6 o'clock whose title
 >>> contains 'news' or whatever with as prerequisitive that the 6 o'clock
 >>> ctv news is missing! I think there are sql rules to that effect
 >>> around.
 >> This sounds serendipitly interesting, though I don't have a use case for it! ;-)
 >> I just checked the examples in the create recording rule screen,
 >> but did not found something similar. Do you have an example (link)?
>  
>  
 >> Nicolas
>  
>  

> I probably could get such a clause working, but I don't know the
>  available variables and the Mythtv specific syntax, if there is.
>  I first should have to search for those. I'll think about the SQL
>  syntax and leave the variables open for now. Coming back if I have
>  something before anybody else does.
>  It could be interesting for me too. The 8 o'clock news here normally
>  is on the first channel, but sometimes (Olympics) moves to the second.
>  

> 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

The IF THEN is inclusive in the rule mechanism. It's what a filter is.
Also don't forget to filter on the same day. And last you need the
count statement included so you get a record count.

I didn't really come around to looking at it. I'm presently working on
my radio bash script and two languages at the same moment gets
confusing.

Tot mails,
  Hika                            mailto:hikavdh at gmail.com

"Zonder hoop kun je niet leven
Zonder leven is er geen hoop
Het eeuwige dilemma
Zeker als je hoop moet vernietigen om te kunnen overleven!"

De lerende Mens



More information about the mythtv-users mailing list