[mythtv] Consolidate all 'The|A|An' prefix handling
Matt Zagrabelny
mzagrabe at d.umn.edu
Wed Feb 1 14:57:46 UTC 2017
Hey David,
Not sure if you want to use the term "Article" to refer to The|A|An
set. Just a thought.
https://en.wikipedia.org/wiki/Article_(grammar)
Thanks for hacking on Myth!
-m
On Wed, Feb 1, 2017 at 8:44 AM, David Hampton <mythtv at dhampton.net> wrote:
> Here's a description of my second take on a patch that began with a
> desire to ignore the 'The|A|An' prefixes when sorting directory
> names. I've enlarged the scope of the patch to consolidate almost all
> instances of removing prefixes as part of sorting. The attached patch
> for 0.28 will:
>
> 1) Add a boolean setting for whether or not sorting of
> video/recording names should be case sensitive.
>
> 2) Add a boolean setting for whether or not to strip 'The|A|An' from
> the start of video/recording titles, filenames, and directory
> components.
>
> 3) Add a text setting for an exclusion list to prevent stripping
> prefixes from the specified strings. Strings to be excluded are
> separated by a semicolon. This should handle issue 12298 where the op
> has a show named 'A to Z'.
>
> 4) Create a new class to consolidate all sorting related variables
> and functions.
>
> 5) Convert almost all locations in the video/recordings code to use
> this new class. The 'Program Finder' is unchanged as it uses customized
> sql queries, and doesn't strip the prefix but moves it to/from the end
> of the string.
>
> 6) Add a call to the new class when sorting video directory names.
> This fixes my original problem (issue 12961).
>
> I have uploaded the diffs to https://pastebin.com/JiviPCuF
>
> I would appreciate any comments on the coding and whether it fits into
> the MythTv style. I'm a long time C programmer, and familiar with svn
> and older source code control systems. I'm still learning about git,
> GitHub, Trac, etc, so please let me know if I should be doing something
> differently. I can (figure out how to) rebase the patch to be off trunk
> if needed.
>
> David
>
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-dev
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
More information about the mythtv-dev
mailing list