[mythtv-users] MythVideo: file name sorting oddity
Brion Swanson
brions at usalug.net
Thu Dec 13 13:05:15 UTC 2007
On Wed, 2007-12-12 at 14:11 -0800, Anduin Withers wrote:
> > [example where items don't sort "normally"]
> > Which is completely un-intuitive to me. Could someone explain this
> > behavior and preferably how to fix it?
>
> This assumes you are ordering by filename and not title in your filter.
Ok, I think I missed this when I read it the first time (and it sort of
nullifies my last email about sorting options as well.
So as it stands what I do is sort by Title (not filename) and I get this
strange sorting behavior. Additionally, I went into the mysql database
and did a few queries to see how mysql would return a selection of
titles in their natural ordering. Here were my results:
1. Select all titles from videometadata -> results in expected
lexicographical order.
2. Select all titles from video metadata where title like "%Back%" ->
results in 4 movies (3 Back to the Future + 1 Hunchback of Notre Dame --
interesting note is the match was case insensitive).
I also noticed in the first search that not only were the results in the
order I expected, but movies starting with 'The' were sorted in the Ts
whereas Myth (more accurately) sorts them ignoring the article (so The
Bourne Identity is listed under B not T).
This suggests that my sorting problem really does lie within the Myth
code and not my locale or mysql because clearly Myth is re-ordering the
results from mysql in order to ignore articles and such, but in doing so
I'm wondering if it's unintentionally reversing the order of like-named
movies (trilogies)?
Am I way off here, or does this seem likely / plausible?
Thanks,
Brion
More information about the mythtv-users
mailing list