Discussion:
Peculiar sorting of blank fields
Jason Woofenden
2011-01-22 05:13:16 UTC
Permalink
Hi all (again),

A funny little thing happened after updating my master (from
d472d60485a5 of 2010-03-21)

In view 2, my one track where I don't have an artist or album
tagged, went from being sorted first, to being sorted near the
middle somewhere (between artists starting with "Noa" and "Non").
It only has these tags:

title=Bass
replaygain_track_peak=1.04890156
replaygain_track_gain=+1.41 dB


I quit cmus, deleted ~/.cmus/cache and fired it up again.

After it finished loading, it says:

1753 tracks sorted by albumartist album discnumber tracknumber title filename

at the top, and it still has the funny sort quirk described above.


I tried to use git bisect to figure out the change that messed it up, and got
very unclear results, because there were some odd sort order bugs recently. The
strangest was when the artist-less track was first, followed by Non through Z,
then A through Noa.

Thanks for investigating.

Take care, - Jason
Johannes Weißl
2011-01-22 19:56:05 UTC
Permalink
Post by Jason Woofenden
Hi all (again),
A funny little thing happened after updating my master (from
d472d60485a5 of 2010-03-21)
In view 2, my one track where I don't have an artist or album
tagged, went from being sorted first, to being sorted near the
middle somewhere (between artists starting with "Noa" and "Non").
I think I can explain that: Current master uses strcoll to compare
strings, which seems to ignore non-alphanumeric characters at the
beginning of the string. The comments_get_albumartist() functions
returns "<No Name>" if no artist is defined, which doesn't make sense
for view 2. That's why I moved these functions to tree.c in my
track_info branch [1] which is also used in the live-filter branch [2].

Is the track sorted first when using live-filter? I can write a separate
patch for this little problem, because it will take time to get all
patches from live-filter applied!


[1] http://gitorious.org/~jmuc/cmus/jw-cmus-speedup/commits/track_info
[2] http://gitorious.org/~jmuc/cmus/jw-cmus-filter/commits/live-filter


Greetings,
Johannes
Jason Woofenden
2011-01-23 01:48:13 UTC
Permalink
Post by Johannes Weißl
Post by Jason Woofenden
Hi all (again),
A funny little thing happened after updating my master (from
d472d60485a5 of 2010-03-21)
In view 2, my one track where I don't have an artist or album
tagged, went from being sorted first, to being sorted near the
middle somewhere (between artists starting with "Noa" and "Non").
I think I can explain that: Current master uses strcoll to compare
strings, which seems to ignore non-alphanumeric characters at the
beginning of the string. The comments_get_albumartist() functions
returns "<No Name>" if no artist is defined, which doesn't make sense
for view 2. That's why I moved these functions to tree.c in my
track_info branch [1] which is also used in the live-filter branch [2].
Ah hah!
Post by Johannes Weißl
Is the track sorted first when using live-filter? I can write a separate
patch for this little problem, because it will take time to get all
patches from live-filter applied!
Yes, with the live-filter branch, it sorts by artist-less track
first. No rush on getting this fix integrated on my account.

Take care, - Jason

Loading...