From 3b5f83675a68e985dd7049df89a124402427747d Mon Sep 17 00:00:00 2001 From: Kalle Wallin Date: Sun, 20 Jun 2004 10:00:25 +0000 Subject: [PATCH] let mpd add directories (just send the path) git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1581 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/screen_file.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/screen_file.c b/src/screen_file.c index 2caf251..ebde970 100644 --- a/src/screen_file.c +++ b/src/screen_file.c @@ -36,6 +36,7 @@ #define USE_OLD_LAYOUT +#undef USE_OLD_ADD #define BUFSIZE 1024 @@ -345,6 +346,7 @@ handle_enter(screen_t *screen, mpdclient_t *c) } +#ifdef USE_OLD_ADD /* NOTE - The add_directory functions should move to mpdclient.c */ extern gint mpdclient_finish_command(mpdclient_t *c); @@ -398,6 +400,7 @@ add_directory(mpdclient_t *c, char *dir) g_list_free(subdir_list); return 0; } +#endif static int handle_select(screen_t *screen, mpdclient_t *c) @@ -414,7 +417,17 @@ handle_select(screen_t *screen, mpdclient_t *c) if( entry->entity->type==MPD_INFO_ENTITY_TYPE_DIRECTORY ) { mpd_Directory *dir = entry->entity->info.directory; +#ifdef USE_OLD_ADD add_directory(c, dir->path); +#else + if( mpdclient_cmd_add_path(c, dir->path) == 0 ) + { + char *tmp = utf8_to_locale(dir->path); + + screen_status_printf(_("Adding \'%s\' to playlist\n"), tmp); + g_free(tmp); + } +#endif return 0; } -- 2.30.2