Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default sort option does not behave well with track numbers in "browse" window #62

Closed
geo909 opened this issue Jan 17, 2016 · 2 comments

Comments

@geo909
Copy link

geo909 commented Jan 17, 2016

Hi,

First thanks for this great program, I love it.

I have the following in my rc file: (note that the formats are identical)

set songformat {%a - %b - %n.%t}|{%f}$E$R $H[$H%l$H]$H
set libraryformat {%a - %b - %n.%t}|{%f}$E$R $H[$H%l$H]$H

Then what happens is that in my "browse" window, tracks that are numbered 1, 2, ..., 9, 10, 11, appear like so:

Artist - Album - 1.First track
Artist - Album - 10.Tenth track
Artist - Album - 11.Eleventh track
Artist - Album - 2.Second track
.
.
.
Artist - Album - 9.Ninth track

However if I set

set sort library

Then the tracks appear in the right order:

Artist - Album - 1.First track
Artist - Album - 2.Second track
.
.
.
Artist - Album - 9.Ninth track
Artist - Album - 10.Tenth track
Artist - Album - 11.Eleventh track

I thought the default is that sort is set to "format", which is exactly the same as with the libraryformat in my rc. So, wouldn't it be the expected behaviour that the default should result the tracks to show as in the second case?

Thanks.

@boysetsfrog
Copy link
Owner

The issue is that the "format" search option is purely a dumb alphabetical sort on the format string. The library sort option however is not based on the library's format string but is based upon the order of the song library itself which is sorted with understanding that track number comes before title etc. The "libraryformat" option purely controls the printing, not sorting. What is really needed is a proper sort that understands that context for the browse window, or simply a print that puts a leading "0" on the track numbers.

It's definitely not really the intended behaviour but i guess it's somewhat sort of expected. I'll see what I can do.

@geo909
Copy link
Author

geo909 commented Jan 19, 2016

Ah, okay, I see what the problem is. Printing a leading zero on the track number can also be tricky in the (admittedly very rare) case of albums with more than 100 tracks, though.

In any case, personally I put "set sort library" and I'm happy, I just wanted to bring it to your attention. Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants