[mythtv-users] Conditional custom recording rule
Ian Evans
dheianevans at gmail.com
Tue Oct 7 08:11:57 UTC 2014
On Tue, Oct 7, 2014 at 3:59 AM, Robin Hill <myth at robinhill.me.uk> wrote:
> [snip]
> I don't think this will do what you think it will. You're asking it to
> record where there's a program on in that time range (or at that time)
> which isn't called 'CTV News', rather than if there's not a program on
> in that time range called 'CTV News' (i.e. if there's any other show on
> that channel in the specified time range then it will record, regardless
> of whether CTV News is also on).
>
> I'd use a not exists rule instead. Lose the additional table detail and
> specify it all in the query - e.g.:
>
> program.title = 'Evening News' AND
> HOUR(CONVERT_TZ(program.starttime,'Etc/UTC', 'SYSTEM')) = 18 AND
> NOT EXISTS (
> select 1 from program pother
> where pother.chanid=1662
> AND pother.starttime = program.starttime
> AND pother.title LIKE 'CTV NEWS%'
> )
>
> You may need to tweak the start times if they're not definitely 6PM (or
> not necessarily the same).
>
> I've not tested this, but if MythTV is just throwing this into a
> standard SQL where clause then I don't see why it shouldn't work.
>
Just created the rule and Evening News is recording on the next 2 Sundays
when CTV is preempted by NFL Football.
Working like a charm so far. Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20141007/9da94d17/attachment.html>
More information about the mythtv-users
mailing list