Mercurial > audlegacy
comparison 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 |
comparison
equal
deleted
inserted
replaced
2682:c3cd6e47faf6 | 2683:d2ffabee3ced |
---|---|
2013 playlist_entry_get_info(a); | 2013 playlist_entry_get_info(a); |
2014 | 2014 |
2015 if (b->tuple != NULL) | 2015 if (b->tuple != NULL) |
2016 playlist_entry_get_info(b); | 2016 playlist_entry_get_info(b); |
2017 | 2017 |
2018 if (a->tuple != NULL && a->tuple->performer != NULL) | 2018 if (a->tuple != NULL && a->tuple->performer != NULL) { |
2019 a_artist = a->tuple->performer; | 2019 a_artist = a->tuple->performer; |
2020 if (b->tuple != NULL && b->tuple->performer != NULL) | 2020 if (str_has_prefix_nocase(a_artist, "the ")) |
2021 a_artist += 4; | |
2022 } | |
2023 | |
2024 if (b->tuple != NULL && b->tuple->performer != NULL) { | |
2021 b_artist = b->tuple->performer; | 2025 b_artist = b->tuple->performer; |
2026 if (str_has_prefix_nocase(b_artist, "the ")) | |
2027 b_artist += 4; | |
2028 } | |
2022 | 2029 |
2023 if (a_artist != NULL && b_artist != NULL) | 2030 if (a_artist != NULL && b_artist != NULL) |
2024 return strcasecmp(a_artist, b_artist); | 2031 return strcasecmp(a_artist, b_artist); |
2025 | 2032 |
2026 return 0; | 2033 return 0; |