comparison src/audtool/handlers.c @ 2814:77a012c3b521 trunk

[svn] - give default values to audacious_remote_* functions. if dbus call fails, default value will be returned. - now audacious_rc_song_filename() calls str_to_utf8() to ensure that the string to return is in utf-8.
author yaz
date Mon, 28 May 2007 10:28:41 -0700
parents 4b8caa739baf
children
comparison
equal deleted inserted replaced
2813:49f3d1b43518 2814:77a012c3b521
52 } 52 }
53 53
54 void get_current_song_filename(gint argc, gchar **argv) 54 void get_current_song_filename(gint argc, gchar **argv)
55 { 55 {
56 gint playpos = audacious_remote_get_playlist_pos(dbus_proxy); 56 gint playpos = audacious_remote_get_playlist_pos(dbus_proxy);
57 57 gchar *file = audacious_remote_get_playlist_file(dbus_proxy, playpos);
58 g_print("%s\n", audacious_remote_get_playlist_file(dbus_proxy, playpos)); 58
59 if (!file)
60 {
61 g_print("No song playing.\n");
62 return;
63 }
64
65 g_print("%s\n", file);
59 } 66 }
60 67
61 void get_current_song_output_length(gint argc, gchar **argv) 68 void get_current_song_output_length(gint argc, gchar **argv)
62 { 69 {
63 gint frames = audacious_remote_get_output_time(dbus_proxy); 70 gint frames = audacious_remote_get_output_time(dbus_proxy);