# HG changeset patch # User nenolod # Date 1150372482 25200 # Node ID 4c9cc4f67818171dcde2409b1d5380995612e465 # Parent 9c41cfb19561915af8c409382e2e32aa327241a8 [svn] - use tuplecache to optimise title sorts diff -r 9c41cfb19561 -r 4c9cc4f67818 ChangeLog --- 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 + 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 revision [1410] - this is a hack until I find a better solution diff -r 9c41cfb19561 -r 4c9cc4f67818 audacious/playlist.c --- 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, '/'))