diff options
author | Kalle Wallin <kaw@linux.se> | 2004-03-25 11:44:59 +0000 |
---|---|---|
committer | Kalle Wallin <kaw@linux.se> | 2004-03-25 11:44:59 +0000 |
commit | 268b0823860274d6079c5dd307770a0769d404ef (patch) | |
tree | 25dea360c739fca9ad931caa1f1aab320770338e /screen_file.c | |
parent | 6777db4e48d23b9841ebd5e081c8dd3f4437a586 (diff) | |
download | mpd-268b0823860274d6079c5dd307770a0769d404ef.tar.gz mpd-268b0823860274d6079c5dd307770a0769d404ef.tar.xz mpd-268b0823860274d6079c5dd307770a0769d404ef.zip |
Added support for a configuration file ~/.ncmpcrc and color support.
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@473 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'screen_file.c')
-rw-r--r-- | screen_file.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/screen_file.c b/screen_file.c index 809ae3faf..69ec85808 100644 --- a/screen_file.c +++ b/screen_file.c @@ -47,8 +47,16 @@ list_callback(int index, int *highlight, void *data) mpd_Song *song = entity->info.song; return mpc_get_song_name(song); } - - return NULL; + else if( entity->type==MPD_INFO_ENTITY_TYPE_PLAYLISTFILE ) + { + mpd_PlaylistFile *plf = entity->info.playlistFile; + char *filename = utf8_to_locale(basename(plf->path)); + + snprintf(buf, BUFSIZE, "%s*", filename); + free(filename); + return buf; + } + return "Error: Unknow entry!"; } static void |