This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#2885 - Ignore "the" in alphabetic dir sort
Attached to Project:
Rockbox
Opened by Anonymous Submitter - Thursday, 05 January 2006, 18:04 GMT+2
Last edited by Rani Hod (RaeNye) - Monday, 18 September 2006, 18:48 GMT+2
Opened by Anonymous Submitter - Thursday, 05 January 2006, 18:04 GMT+2
Last edited by Rani Hod (RaeNye) - Monday, 18 September 2006, 18:48 GMT+2
|
DetailsIgnores "The" in the beginning of directory/file names
when alphabetically sorting. Also skips exactly one trailing whitespace if present. bk mutualaid (at) gmail.com |
This task depends upon
Closed by Jonathan Gordon (jdgordon)
Thursday, 21 December 2006, 14:30 GMT+2
Reason for closing: Rejected
Additional comments about closing: general consensus in IRC is that this adds nothing which couldn\'t be done by renaming your files.
Thursday, 21 December 2006, 14:30 GMT+2
Reason for closing: Rejected
Additional comments about closing: general consensus in IRC is that this adds nothing which couldn\'t be done by renaming your files.
Thanks for the patch! does this add an option to turn this
feature on/off? if not, can this option be added?
saa[b_r]ider
No, it doesn't add a config option. I would consider this to
be config option bloat; either Rockbox does a "smart sort"
disregarding 'the' or it doesn't, there's little need for
yet another config item.
I *would* like to make it multi-lingual but I have no idea
how Rockbox localization works, or even if there is the
necessary info available for all languages.
Latest version of this patch is available here:
http://forums.rockbox.org/index.php?topic=2272.msg16018#msg16018
e.g. In my file manager I can set this as my ignore prefix:
"The |A "
A config file saves you having to think of all the prefixes for every langauge in advance, and means people can include/exclude them to their taste. e.g. Some people may find it weird that "A" is ignored but still want "The" ignored. Of course, having a good default config file in CVS is still important so that people are not forced to configure it, but being able to configure if desired is a plus.
If that isn't feasible than an additional config item could be added, but then a parser for it would need to added (because it would be a string with the different ignore tokens separated by delimiters) and probably a GUI menu item and all these would complicate the patch significantly.
- Ignore "The" always (except for The The which could make some confusion)
Ignore "Billy" in "Billy Bragg" (i.e. an artists' name), but not in "Billy Talent" which is a band name.
When you say "Ignores "The" in the beginning of directory/file names when alphabetically sorting. Also skips exactly one trailing whitespace if present."
Does that mean that "Therapy" will be sorted on "r"? I assuming no, of course.
Your suggestions would be addressed if this was implemented as a custom list of 'ignorable' strings (that would fix the localization issue too). However it's not possible for the sort code to distinguish between "Billy Bragg" and "Billy Talent", the string Billy is identical in both and it has no way of knowing that one should be ignored and the other should not.
The attached patch works both in file view and tagcache and also
adds a config option to turn it on and off.
Have fun
It applies cleanly against CVS from 20061120-2230
"patching file apps/filetree.c
patching file apps/tagcache.c
hunk #1 succeeded at 1636 (offest 20 lines).
hunk #2 FAILED at 1674."
All other hunks succeed.
for id3 view and file view separately
Synced against CVS from today
Maybe I have some wrong tabs instead of spaces in
this file