When sorting songs ario_tree_songs_sort_func compares the values for 'disc' and -if they are equal- falls back to comparing the values for 'track' if the first comparison yielded equal. But the values for those fields are more often than not numbers or strings of the form "aa/bb" or "aa-bb" or "aa of bb" and comparing numbers using g_utf8_collate yields wrong results if the numbers are not zero padded to the same length.
So I propose to try to convert the values for those fields to numbers ignoring anything from the first non digit character on *or* fall back to g_utf8_collate in case this fails (i.e. the end pointer passed to g_ascii_strtoll still points to the start of the string since no prefix consisting of only digit characters was found).
This improves the sort order of several multi cd audio books in our collection considerably.
Log in to post a comment.