Discussion:
unknown
1970-01-01 00:00:00 UTC
Permalink
/*
* Sort regular albums by date, but sort compilations
* alphabetically.
*/
if (is_compilation) {
list_for_each(item, &artist->album_head) {
struct album *a =3D to_album(item);

if (special_name_cmp(name, a->name) < 0)
break;
}
} else {
list_for_each(item, &artist->album_head) {
struct album *a =3D to_album(item);

if (special_album_cmp(album, a) < 0)
break;
}
}

Does it look very broken to anybody else?

As I see it, when e.g. adding 1 compilation to 10 normal albums, cmus
will try to find a place for compilation by looking the albums up in
date order, and then compare the *names* of albums! So, compilation
will be placed in a completely random place in the list.

Proper way would be of course to sort (separately!) compilations by
name, and sort (separately!) regular albums by date, and simply
speaking concatenate this 2 ordered lists.

Am I right?

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Gregory

Loading...