[mythtv] "A", "An", and "The" for sorting - ticket 3048

Chris Hamilton chamilton at cs.dal.ca
Tue Feb 6 13:48:58 UTC 2007

> On Tuesday 6 February 2007 3:42 am, Chris Pinkham wrote:
>> * On Mon Feb 05, 2007 at 09:06:16PM -0600, Matt wrote:
>>> However, I still believe that "The" should be ignored in sorting.
>> Not that I care since I don't use MythMusic, but I'm sure "The Who"
>> would disagree with you on this point. :)
> ...and what about "The The"? I don't want them to disappear. My vote is to 
> sort using the name of the artist/band as the artist/band would write it. 
> It's their name after all and I think it's only polite to respect that.

While this is very pragmatic, its not very practical (IMHO).  The
problem I have with this is in my music collection, there are roughly 30
bands bands whose names begin with any given letter 'A', 'B', etc.
However, there are 106 bands beginning with a 'T', and out of those 70
of them start with a 'The'.  So, when navigating through my music I
would have a disproportionately large 'T' section, which is a little
tedious to navigate through.

As I stated earlier, my preference would be to let this be configurable
as follows:

(1) Is prefix handling enabled?
    (2) If enabled, what is the set of prefixes to look for?
        (people using different or multiple languages might want to
         configure these prefixes)
    (3) If a prefix is found, how is it displayed?
        (left at the beginning, or moved to the end?)

The way prefixes are currently handled (at runtime, string is check for
a match against each of the prefixes, the prefix is moved to the right
hand side of the string, the strings are sorted, then the prefix is
moved back), this gets quite expensive (and introduces noticeable lag)
as soon as you move past 3 or 4 prefixes.  To this end, it seems like it
might be preferable to introduce a new field to the database (for music
at least) as mentioned by brian, which gets populated when the database
is built.


More information about the mythtv-dev mailing list