[mythtv] Power Recording Rule excluding genres

David Hampton mythtv at love2code.net
Wed Dec 12 17:32:42 UTC 2018


On Wed, 2018-12-12 at 09:57 -0600, David Engel wrote:
> On Wed, Dec 12, 2018 at 08:38:01AM -0500, David Hampton wrote:
> > On Wed, 2018-12-12 at 00:18 -0600, David Engel wrote:
> > > Short of a major overhaul of the power rules, I only see a couple
> > > of
> > > options.  Either increase the size of the subtitle column or add
> > > new,
> > > extratables and whereclause columns for power rules to use
> > > instead of
> > > overloading the subtitle and description columns.  Of the two,
> > > increasing the size of the subtitle column is by far the easier
> > > solution.  You might try it on your own database unless and until
> > > someone else need the same change.
> > 
> > I've spent some time recently banging my head against the
> > overloading
> > of the subtitle column by the power search rule.  I'd much prefer
> > that
> > this hack go away and that new columns be added to the database.
> 
> I'm not objecting, but I'm curious as to what real problems the
> overloading causes.  Yes, I know it's confusing to the unwitting.
> Without the overloading, though, you wind up with two columns that
> are
> never used in one case and another two columns that are never used in
> the other case.

I've been working on code to ignore the prefixes 'A', 'An', and 'The'
throughout MythTV when sorting lists.  I found that the easiest way to
do that was to add new member variables to the various objects, and
create the sortable version of the title/subtitle/etc when the object
is created.  In doing so I ran across the power search code, and had to
special case it to never attempt to create a sortable version of the
subtitle (although I don't those strings would ever start with one of
the magic prefixes.)  No real problem, just additional code that has to
understand whether a subtitle is really a subtitle or a WHERE clause
from a power search.  I'm not fully versed in the ways of mysql, but
wouldn't a new column of type varchar not take up any space if there
wasn't any value?

David





More information about the mythtv-dev mailing list