--- song_change.c.orig 2008-02-28 17:13:14.000000000 -0800 +++ song_change.c 2008-02-28 17:15:54.000000000 -0800 @@ -342,15 +342,16 @@ int pos, length, rate, freq, nch; char *str, *shstring = NULL, *temp, numbuf[16]; gboolean playing, run_end_cmd = FALSE; - static char *previous_file; - char *current_file; + static char *previous_file, *previous_title; + char *current_file, *current_title; Formatter *formatter; GDK_THREADS_ENTER(); playing = xmms_remote_is_playing(sc_gp.xmms_session); pos = xmms_remote_get_playlist_pos(sc_gp.xmms_session); - current_file = xmms_remote_get_playlist_file(sc_gp.xmms_session, pos); + current_file = xmms_remote_get_playlist_file(sc_gp.xmms_session, pos); + current_title = xmms_remote_get_playlist_title(sc_gp.xmms_session, pos); /* Format codes: * @@ -363,15 +364,21 @@ * s - name (since everyone's used to it) * t - playlist position (%02d) */ - if (pos != previous_song || - (!previous_file && current_file) || - (previous_file && !current_file) || + if (pos != previous_song || + (!previous_file && current_file) || + (previous_file && !current_file) || (previous_file && current_file && - strcmp(previous_file, current_file))) + strcmp(previous_file, current_file)) || + (previous_title && current_title && + strcmp(previous_title, current_title)) + ) { g_free(previous_file); + g_free(previous_title); previous_file = current_file; + previous_title = current_title; current_file = NULL; + current_title = NULL; previous_song = pos; if (cmd_line && strlen(cmd_line) > 0)