[mythtv] Ignore 'The|A|An' prefixes when sorting video directories

mythtv at phipps-hutton.freeserve.co.uk mythtv at phipps-hutton.freeserve.co.uk
Fri Jan 6 13:02:29 UTC 2017


Quoting David Hampton <mythtv at dhampton.net>:

> P.S. I know there's bug report (#12298) that says that sorting should
> never ignore prefixes. I was thinking that an exception list would
> solve the reported problem (i.e. don't strip prefixes from the string
> "A to Z") while stripping prefixes for the normal case. I was
> considering this as a follow-on project, although passing a list of
> strings into the various sorting functions seems messier than the
> current code that only passes a single boolean.
>

I've added a comment to #12298 that outlines a way to fix this.  
Basically it punts the problem outside of the MythTV code by adding an  
extra field to the database that is used for simple sorting. The extra  
field should be copied from the title and then it can be manipulated  
by a script to remove the prefixes and all the complexity of what to  
remove and what not to remove can be in one place and it only has to  
run once per show rather than every time a list is produced.

Cheers,
Tim.




More information about the mythtv-dev mailing list