Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: RB Directory listing order
From: Bryan VanDyke (bryan314_at_yahoo.com)
Date: 2004-08-02


[IDC]Dragon wrote:

>>I'm a long term Rockbox user, and there's a little feature that was
>>allways missing : the right 1-*.mp3, 01-*.mp3, 10-*.mp3 files handling
>>in the directory linstings. Let me show you an example, that's the way
>>all of my albums are named, here is 2Pac's Better Dayz album (Cd1) the
>>way Rocbox, and everyone else, lists it :
>>1. Intro.mp3
>>10. Fair xchange.mp3
>>11. Late night.mp3
>>12. Ghetto Star.mp3
>>13. Thugz Mansion (acoustic).mp3
>>2. Still Ballin.mp3
>>3. When you ride on out enemies.mp3
>>4. Changed Man.mp3
>>5. Fuck'em all.mp3
>>6. Never be peace.mp3
>>7. Mamas just a little girl.mp3
>>8. Street fame.mp3
>>9. Whatcha gonna do.mp3
>>
>>Now this is the way I'd want them to appear in the list :
>>1. Intro.mp3
>>2. Still Ballin.mp3
>>3. When you ride on out enemies.mp3
>>4. Changed Man.mp3
>>5. Fuck'em all.mp3
>>6. Never be peace.mp3
>>7. Mamas just a little girl.mp3
>>8. Street fame.mp3
>>9. Whatcha gonna do.mp3
>>10. Fair xchange.mp3
>>11. Late night.mp3
>>12. Ghetto Star.mp3
>>13. Thugz Mansion (acoustic).mp3
>>
>>This is the way Windows XP sorts the tracks too when I open the
>>folder,
>
>
> If you let windows sort by name, I'm pretty sure it will do the same as
> rockbox. Maybe the order was correct because you sorted by date/time?
> Rockbox can do that as well.
>
>
>>and it would be great if Rockbox could take a little time
>>re-ordering the files that way ;). I know I could rename the files
>>"01. Intro.mp3", "02. Still Ballin.mp3", ... but it's not really the
>>way I want them (inesthetic hack :).
>
>
> I think pretty much everybody (outside the rockbox-world as well) uses a
> 2-digit track number, because of the sorting issue. There are tools which
> can do the renaming for you, check out e.g. the godfather.
>
>
>>Would it be possible to have Rockbox behaving that way ?
>
>
> I doubt we will let the dir sorting do something else than you told it. ;-)
>
> Jörg
>

The sorting is called Natural Order Sort. I've used it in a custom
version of rockbox I use for myself. I used a library (strnatcmp.c,
strnatcmp.h ) found at http://sourcefrog.net/projects/natsort/ I had to
tweak it a little to work on rockbox and work the way I wanted it too.

In rockbox I replaced strncmp, strncasecmp in the compare function in
tree.c.

Bryan :)

_______________________________________________
http://cool.haxx.se/mailman/listinfo/rockbox



Page was last modified "Jan 10 2012" The Rockbox Crew
aaa