# HG changeset patch # User nenolod # Date 1154680522 25200 # Node ID e7e94da0737be55412c59f57cad462b7b97f4cf7 # Parent a9e00b61a389e54bd59c8af6d2587b88a32f6dd7 [svn] - also detect changes based on playlist "displayed title" diff -r a9e00b61a389 -r e7e94da0737b ChangeLog --- a/ChangeLog Fri Aug 04 01:24:02 2006 -0700 +++ b/ChangeLog Fri Aug 04 01:35:22 2006 -0700 @@ -1,3 +1,12 @@ +2006-08-04 08:24:02 +0000 William Pitcock + revision [1904] + - fix the real_ip.set_info mapping properly when InputPlugin cue_ip::stop() is reached. + + + Changes: Modified: + +1 -1 trunk/Plugins/Input/cue/cuesheet.c + + 2006-08-04 08:21:49 +0000 William Pitcock revision [1902] - use $(NOTIFY_LIBS) and $(NOTIFY_CFLAGS)... not really much of difference, but yeah diff -r a9e00b61a389 -r e7e94da0737b Plugins/General/notify/notify.c --- a/Plugins/General/notify/notify.c Fri Aug 04 01:24:02 2006 -0700 +++ b/Plugins/General/notify/notify.c Fri Aug 04 01:35:22 2006 -0700 @@ -19,6 +19,7 @@ static gint timeout_tag = 0; static gint notify_playlist_pos = -1; +static gchar *previous_title = NULL; /* our API. */ static void do_notification(gchar *summary, gchar *message, gchar *icon_uri); @@ -49,13 +50,22 @@ static void cleanup(void) { gtk_timeout_remove(timeout_tag); + + if (previous_title != NULL) + { + g_free(previous_title) + previous_title = NULL; + } } static gboolean watchdog_func(gpointer unused) { gint pos = playlist_get_position(); + gchar *title = playlist_get_songtitle(pos); - if (pos != notify_playlist_pos) + if (pos != notify_playlist_pos || + (title != NULL && previous_title != NULL && + g_strcasecmp(title, previous_title))) { gchar *tmpbuf; TitleInput *tuple; @@ -76,6 +86,14 @@ notify_playlist_pos = pos; + if (previous_title != NULL) + { + g_free(previous_title) + previous_title = NULL; + } + + previous_title = g_strdup(title); + return TRUE; }