Rockbox

  • Status Closed
  • Percent Complete
    0%
  • Task Type Patches
  • Category User Interface
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by Anonymous Submitter - 2006-01-05
Last edited by RaeNye - 2006-09-18

FS#2885 - Ignore "the" in alphabetic dir sort

Ignores “The” in the beginning of directory/file names
when alphabetically sorting. Also skips exactly one
trailing whitespace if present.

bk
mutualaid (at) gmail.com

Closed by  jdgordon
2006-12-21 13:30
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.

Anonymous Submitter commented on 2006-01-05 20:55

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

Anonymous Submitter commented on 2006-01-05 23:37

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.

bk01 commented on 2006-01-10 23:36

Latest version of this patch is available here:
http://forums.rockbox.org/index.php?topic=2272.msg16018#msg16018

Nudel commented on 2006-03-12 09:20

Maybe the list should be configurable? Initially I thought maybe as part of the language file but I think it would be better as a separate config file (or string in the main config file) because I imagine people may want to mix prefixes from several languages together.

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.

bk commented on 2006-03-14 16:27

I agree it should be localized somehow, but I think it should be integrated with the existing localization system if possible. There needs to be an item in each language specifying that language’s version of “the” (possibly also “A”). I have no idea if that’s already provided or if not what it would take to provide it.

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.

In order to make such a feature really valuable, it would be extremely cool if I make my player do this:
- 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.

By the way:
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.

bk commented on 2006-09-20 23:21

No, “Therapy” would be sorted normally in the last patch (which is available in the forum thread).

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.

Well, it would be able to sort “Billy” correctly, if it honoured the relevant tag, see http://www.rockbox.org/tracker/task/5923

Does this also apply when browsing the tag cache, or just when browsing the file system?

bk commented on 2006-11-08 23:43

Anything that uses the qsort function will be affected, I assume this includes TagCache but I don’t know that for sure.

No tagcache has a different compare function.

The attached patch works both in file view and tagcache and also
adds a config option to turn it on and off.

Have fun

hunk error… you need to resync

What “hunk error” It applies cleanly against CVS from 20061120-2230

I just tried applying to CVS from 20061207-1946 and get a hunk error:
“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.

Fixed hunk error reported by Brock

Added config option to enable/disable the “ignoring” for id3 view and file view separately

Synced against CVS from today

I just tried applying against today’s CVS (20061213-0455), and I get the same hunk failure message as before. ???

Can you please try patch -I (ignore whitespaces)
Maybe I have some wrong tabs instead of spaces in
this file

Sorry. It works now. I had issues saving the file correctly. It was a dumb mistake by me. Thanks!

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing