Mercurial > audlegacy
changeset 1250:4c9cc4f67818 trunk
[svn] - use tuplecache to optimise title sorts
author | nenolod |
---|---|
date | Thu, 15 Jun 2006 04:54:42 -0700 |
parents | 9c41cfb19561 |
children | 5f09d64c61e2 |
files | ChangeLog audacious/playlist.c |
diffstat | 2 files changed, 20 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Thu Jun 15 04:05:23 2006 -0700 +++ b/ChangeLog Thu Jun 15 04:54:42 2006 -0700 @@ -1,3 +1,12 @@ +2006-06-15 11:05:23 +0000 William Pitcock <nenolod@nenolod.net> + revision [1412] + - tuple builder for wma + + + Changes: Modified: + +47 -13 trunk/Plugins/Input/wma/wma.c + + 2006-06-15 10:37:59 +0000 William Pitcock <nenolod@nenolod.net> revision [1410] - this is a hack until I find a better solution
--- a/audacious/playlist.c Thu Jun 15 04:05:23 2006 -0700 +++ b/audacious/playlist.c Thu Jun 15 04:54:42 2006 -0700 @@ -1751,12 +1751,20 @@ playlist_compare_title(const PlaylistEntry * a, const PlaylistEntry * b) { - const gchar *a_title, *b_title; + const gchar *a_title = NULL, *b_title = NULL; g_return_val_if_fail(a != NULL, 0); g_return_val_if_fail(b != NULL, 0); - if (a->title) + if (a->tuple != NULL && a->tuple->track_name != NULL) + a_title = a->tuple->track_name; + if (b->tuple != NULL && b->tuple->track_name != NULL) + b_title = b->tuple->track_name; + + if (a->title != NULL && b->title != NULL) + return strcasecmp(a_title, b_title); + + if (a->title != NULL) a_title = a->title; else { if (strrchr(a->filename, '/')) @@ -1765,7 +1773,7 @@ a_title = a->filename; } - if (b->title) + if (b->title != NULL) b_title = b->title; else { if (strrchr(a->filename, '/'))