[mythtv] Ticket #1678: mythvideo sorting is case-sensitive

Michael T. Dean mtdean at thirdcontact.com
Sat Apr 22 07:41:11 UTC 2006


On 04/21/2006 12:37 PM, George Nassas wrote:
> However, as to the original report, the revision history for 
> videolist.cpp doesn't go back far enough but I suspect there has always 
> been a sql sort vs map sort difference and there was never universal 
> case insensitivity. Perhaps his DB environment changed around the time 
> he upgraded myth. Also whatever. This is not a big issue for me.
>   

http://svn.mythtv.org/trac/changeset/6646

0.18 was tagged 6080.

> One other comment, the patch Michael Dean submitted does key creation 
> inside the compare function. With 1,000 videos that code will get hit 
> 3,000 times (the sort is NlogN).

Yep.  Any chance you could test it and see how it performs on your 
system?  I didn't think it should be a problem on MythVideo-sized lists, 
but I'm happy to reimplement if it is a problem for someone.

However, if we do change Metadata, instead of generating the sort key 
when building the list, we may want to consider a more permanent--and 
user-changeable--sort key.  The comment explaining the sorting behavior 
talks about including a sort key in the video's metadata in the 
database.  If we did this, we could reduce sort key creation to once per 
video "ever" instead of once per video per sort.  The hard part would be 
deciding when to update the sort key--every time the title is changed, 
or if the old sort key is what would have been autogenerated for the old 
title, or only when requested by the user (i.e. with a button next to 
the (to be added) sort key text box in Edit Metadata), or ...  However, 
keeping the sort key in the database would allow the user to "fix" the 
sort key--and, therefore, solve problems with "A la Cart" in an English 
locale or "Die Hard" in a German locale, etc.

Mike


More information about the mythtv-dev mailing list