# HG changeset patch # User nhjm449 # Date 1155426369 25200 # Node ID 063fde7e5100467316f79f2e2255917c1b4ba265 # Parent 18edacaa31261eaa03361d1bfbe08a6999879be3 [svn] - Show the filename if there's no track_name diff -r 18edacaa3126 -r 063fde7e5100 ChangeLog --- a/ChangeLog Fri Aug 11 18:41:53 2006 -0700 +++ b/ChangeLog Sat Aug 12 16:46:09 2006 -0700 @@ -1,3 +1,12 @@ +2006-08-12 01:41:53 +0000 William Pitcock + revision [2068] + - installing Container plugins might help! + + + Changes: Modified: + +1 -1 trunk/Plugins/Makefile.in + + 2006-08-11 12:13:11 +0000 Yoshiki Yazawa revision [2066] jump to file dialog now accepts multi-byte input. diff -r 18edacaa3126 -r 063fde7e5100 Plugins/General/notify/notify.c --- a/Plugins/General/notify/notify.c Fri Aug 11 18:41:53 2006 -0700 +++ b/Plugins/General/notify/notify.c Sat Aug 12 16:46:09 2006 -0700 @@ -7,6 +7,7 @@ #include #include #include +#include #include #include "audacious/plugin.h" @@ -113,7 +114,7 @@ g_strcasecmp(title, previous_title)) || (title == NULL && pos != notify_playlist_pos) || (! was_playing))) { - gchar *tmpbuf; + gchar *tmpbuf, *filename; TitleInput *tuple; tuple = playlist_get_tuple(pos); @@ -121,14 +122,19 @@ if (tuple == NULL) return TRUE; - /* - FIXME: This is useless for formats without metadata. - Proposed Remedy: playlist_get_filename(pos) instead of _("Unknown Track") - */ + filename = playlist_get_filename(pos); + tmpbuf = g_markup_printf_escaped("%s\n%s\n%s", (tuple->performer ? tuple->performer : ( audcfg.notif_skipnf == FALSE ? _("Unknown Artist") : "" )), (tuple->album_name ? tuple->album_name : ( audcfg.notif_skipnf == FALSE ? _("Unknown Album") : "" )), - (tuple->track_name ? tuple->track_name : ( audcfg.notif_skipnf == FALSE ? _("Unknown Track") : "" ))); + (tuple->track_name ? + tuple->track_name : + (filename ? + (strrchr(filename, '/') ? (strrchr(filename, '/') + 1) : filename) : + _("Unknown Track") + ) + ) + ); do_notification("Audacious", tmpbuf, DATA_DIR "/pixmaps/audacious.png"); g_free(tmpbuf);