Mercurial > audlegacy
diff src/audacious/playlist.c @ 2683:d2ffabee3ced trunk
[svn] Modified playlist_compare_artist so that a leading "the" in an artist's
name is ignored during sorting.
author | magma |
---|---|
date | Tue, 17 Apr 2007 23:36:31 -0700 |
parents | e9b379528fbc |
children | 62579e205746 |
line wrap: on
line diff
--- a/src/audacious/playlist.c Mon Apr 16 04:19:03 2007 -0700 +++ b/src/audacious/playlist.c Tue Apr 17 23:36:31 2007 -0700 @@ -2015,10 +2015,17 @@ if (b->tuple != NULL) playlist_entry_get_info(b); - if (a->tuple != NULL && a->tuple->performer != NULL) + if (a->tuple != NULL && a->tuple->performer != NULL) { a_artist = a->tuple->performer; - if (b->tuple != NULL && b->tuple->performer != NULL) + if (str_has_prefix_nocase(a_artist, "the ")) + a_artist += 4; + } + + if (b->tuple != NULL && b->tuple->performer != NULL) { b_artist = b->tuple->performer; + if (str_has_prefix_nocase(b_artist, "the ")) + b_artist += 4; + } if (a_artist != NULL && b_artist != NULL) return strcasecmp(a_artist, b_artist);