# HG changeset patch # User Yoshiki Yazawa # Date 1222935124 -32400 # Node ID b88a5f93422494366799741ead4d878bd9b3387d # Parent 89bd98990fff003ba643516154af0959e4285702 preliminary support for purple_util_set_current_song() diff -r 89bd98990fff -r b88a5f934224 pidgin-audacious.c --- a/pidgin-audacious.c Sun Sep 28 00:58:59 2008 +0900 +++ b/pidgin-audacious.c Thu Oct 02 17:12:04 2008 +0900 @@ -121,6 +121,22 @@ aud_process(song); g_free(song); song = NULL; + + /* preliminary support for purple_util_set_current_song() */ + gchar *artist = NULL, *title = NULL, *album = NULL; + + artist = audacious_get_tuple_field_data(session, "artist", playpos); + title = audacious_get_tuple_field_data(session, "title", playpos); + album = audacious_get_tuple_field_data(session, "album", playpos); + + purple_util_set_current_song(title ? title : "", + artist ? artist : "", + album ? album : ""); + + g_free(artist); + g_free(title); + g_free(album); + return rv; }