[mythtv-users] Custom Record help, please

John P Poet jppoet at gmail.com
Wed Dec 13 03:25:24 UTC 2006


On 12/12/06, Tom Lichti <tom at redpepperracing.com> wrote:
> John P Poet wrote:
> > On 12/12/06, Robert Johnston <anaerin at gmail.com> wrote:
> >
> >> On 12/12/06, John P Poet <jppoet at gmail.com> wrote:
> >>
> >>> I want to craft a custom record rule which will match Crime and
> >>> Mystery dramas.  I do *not* want reality crime shows.
> >>>
> >>> Looking through some of the shows I would like it to match, I see:
> >>>
> >>> Category: Crime, Drama
> >>> Category: Crime drama
> >>> Category: Mystery, Drama
> >>> Category: Crime drama, Mystery
> >>>
> >>> Among the shows I do *not* want it to catch, I see:
> >>>
> >>> Category: Mystery
> >>> Category: Crime
> >>>
> >>> I have tried to craft a rule which looks for either Mystery|Crime
> >>> *and* Drama, but it does not work.  Can someone give me an example of
> >>> how to do this?
> >>>
> >> Would not "(Crime OR Mystery) AND Drama" work?
> >>
> >
> > That is equivalent to what I tried, but it results in no matches.
> >
> > If I try
> >
> > programgenres.genre = 'Crime'
> >
> > It will match a show with "Category: Crime, Drama" (and a lot of show
> > I don't want)
> >
> > If I try
> >
> > programgenres.genre = 'Drama'
> >
> > It still matches a show with "Category: Crime, Drama" (and a lot of
> > show I don't want)
> >
> > If I try
> >
> > programgenres.genre = 'Crime' AND programgenres.genre = 'Drama'
> >
> > It matches nothing.
> >
> > John
> >
> How about:
>
> (programgenres.genre like '%Crime%' or programgenres.genre like
> '%Mystery%') AND programgenres.genre like %'Drama%'
>
> With my listing data (datadirect) this gives me Law and Order (all), CSI
> (all), Sopranos, NCIS, Without a Trace, The District, 24, Quincy, and
> numerous other shows. Is that what you are trying to get?
>
> Tom

For me, that catches shows with

Category: Crime drama

but still misses out on shows with

Category: Crime, Drama

My rule is also matching only on BBC America, but that should not make
a difference.

I was trying:

programgenres.genre REGEXP '(Mystery|Crime)' and programgenres.genre
like '%drama%'

and that was matching nothing.  After looking at your example, I tried
adding some parentesis:

(programgenres.genre REGEXP '(Mystery|Crime)') and programgenres.genre
like '%Drama%'

and then, at least, it started matching some shows, but still missed
the case where Crime and Drama are two separate fields.

Thanks for the suggestions.

John


More information about the mythtv-users mailing list