PDA

View Full Version : Wrong folder numbering



vdorta
2010-06-06, 09:36
I created individual folders for a Haydn London Symphonies boxed set (Symphonies 93 to 104). In the Music Folder, Squeezebox Server shows them like this:

Symphony No. 100
Symphony No. 101
- / -
Symphony 93
Symphony 94
etc.

snarlydwarf
2010-06-06, 10:43
I created individual folders for a Haydn London Symphonies boxed set (Symphonies 93 to 104). In the Music Folder, Squeezebox Server shows them like this:

Symphony No. 100
Symphony No. 101
- / -
Symphony 93
Symphony 94
etc.

That's odd: numbers should sort before letters. (ie, '9' in 93 should sort before 'N' in 'No.')

Or did you fudge the names a bit?

"93" will sort -after- "101" because 9 is greater than 1 in sorting.

Best way to do that would be either to have a leading 0 ("093") of if that is too geeky, " 93".. See, a space will sort before numbers, so " 93" will show up before "101".

vdorta
2010-06-06, 11:19
Thanks, but I don't know if we're on the same page here. I am talking about folder, not file naming. I thought this kind of error wouldn't appear by now in computing. Evidently, for Squeezebox Server "100" comes before "94" because number 1 comes before number 9, and so on. Weird.

snarlydwarf
2010-06-06, 11:51
Thanks, but I don't know if we're on the same page here. I am talking about folder, not file naming. I thought this kind of error wouldn't appear by now in computing. Evidently, for Squeezebox Server "100" comes before "94" because number 1 comes before number 9, and so on. Weird.

Not weird at all, that's how sorting works unless you go to great pains trying to be clever and spotting numbers within a string... nothing I know of does that. (ie, not "dir" or "ls" or Windows Explorer or SQL 'order by' clauses or file selection dialogue boxes on your PC...)

Phil Leigh
2010-06-06, 12:30
Thanks, but I don't know if we're on the same page here. I am talking about folder, not file naming. I thought this kind of error wouldn't appear by now in computing. Evidently, for Squeezebox Server "100" comes before "94" because number 1 comes before number 9, and so on. Weird.

No - that's how computers work - it's how they have always worked. 1 always comes before 9!.

vdorta
2010-06-06, 17:51
I am sorry, but Windows shows the folders in the order I wrote them, Symphony No. 93, No. 94 and so on. XMPlay does it correctly too.

JJZolx
2010-06-06, 18:17
I am sorry, but Windows shows the folders in the order I wrote them, Symphony No. 93, No. 94 and so on. XMPlay does it correctly too.

Windows is employing what is sometimes called a 'natural' sort. It treats strings of numerals as a numeric entity. (You can suppress this behavior if you like. See http://support.microsoft.com/kb/319827.) The problem in Squeezebox Server is that Browse Music Folder doesn't actually browse the folder structure by retrieving directory information from the operating system. Instead, during a scan of the library the scanner stores the folder paths and when you browse the Music Folder you're actually doing so using the database. The way the database server sorts those strings is the way you're seeing, with no special treatment of numeric strings.