changeset 28:72c95262fd1b

check playing status on sign-on and replace token with no song message if not playing.
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Thu, 10 Sep 2009 17:07:53 +0900
parents 1d6975f2b5b3
children c1e5ff55f1b4
files pidgin-audacious.c
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin-audacious.c	Sat Jun 20 10:14:52 2009 +0900
+++ b/pidgin-audacious.c	Thu Sep 10 17:07:53 2009 +0900
@@ -566,6 +566,7 @@
                                      NULL);
 
     aud_debug("player_name = %s\n", player_name);
+    g_free(player_name);
 
     if(!session) {
         session = get_dbus_session();
@@ -648,8 +649,13 @@
 
     aud_debug("called\n");
 
-    if(!is_app_playing())
+    if(!is_app_playing()) {
+        /* clear status/user info */
+        aud_process(NULL);
+        /* clear current song */
+        purple_util_set_current_song(NULL, NULL, NULL);
         return;
+    }
 
     table = get_song_table();
     tuple = get_song_tuple(table);