diff options
author | Kalle Wallin <kaw@linux.se> | 2004-06-08 14:02:24 +0000 |
---|---|---|
committer | Kalle Wallin <kaw@linux.se> | 2004-06-08 14:02:24 +0000 |
commit | 68176d260a785ee664868cbb94478927da7d9741 (patch) | |
tree | 8ec80e308a1632a6bb052fd8b17637d16bf72309 | |
parent | fadbcce56a23b440a7d7782b235ccc38c20be84e (diff) | |
download | mpd-68176d260a785ee664868cbb94478927da7d9741.tar.gz mpd-68176d260a785ee664868cbb94478927da7d9741.tar.xz mpd-68176d260a785ee664868cbb94478927da7d9741.zip |
Display the the entire url when a streams metadata==NULL
s no metadata, can you display the
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1394 09075e82-0dd4-0310-85a5-a0d7c8717e4f
-rw-r--r-- | src/mpc.c | 12 | ||||
-rw-r--r-- | src/screen_play.c | 2 |
2 files changed, 12 insertions, 2 deletions
@@ -320,7 +320,8 @@ mpc_get_song_name2(mpd_Song *song) { static char buf[MAX_SONG_LENGTH]; char *name; - + + /* streams */ if( song->name ) { name = utf8_to_locale(song->name); @@ -328,7 +329,16 @@ mpc_get_song_name2(mpd_Song *song) g_free(name); return buf; } + else if( strstr(song->file, "://") ) + { + name = utf8_to_locale(song->file); + strncpy(buf, name, MAX_SONG_LENGTH); + g_free(name); + + return buf; + } + /* regular songs */ if( song->title ) { if( song->artist ) diff --git a/src/screen_play.c b/src/screen_play.c index a14033289..8d3fc6cf7 100644 --- a/src/screen_play.c +++ b/src/screen_play.c @@ -339,7 +339,7 @@ playlist_delete_song(mpd_client_t *c, int index) /* print a status message */ screen_status_printf(_("Removed \'%s\' from playlist!"), - mpc_get_song_name(song)); + mpc_get_song_name2(song)); /* clear selected highlight in the browse screen */ file_set_highlight(c, song, 0); |