[mythtv] Power Recording Rule excluding genres

David Engel david at istwok.net
Wed Dec 12 19:47:18 UTC 2018


On Wed, Dec 12, 2018 at 12:32:42PM -0500, David Hampton wrote:
> 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?

That use sounds reasonable.  I don't know about the storag
implications.  It might depend on the MySQL engine used.  Where's Mike
Dean when we need him? :)

David
-- 
David Engel
david at istwok.net


More information about the mythtv-dev mailing list