aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKalle Wallin <kaw@linux.se>2004-06-20 10:00:25 +0000
committerKalle Wallin <kaw@linux.se>2004-06-20 10:00:25 +0000
commit3b5f83675a68e985dd7049df89a124402427747d (patch)
tree96b1fe797bc6db524445037c7491fb74777ed4c4 /src
parentf300805be5a2a07f26b48647b26cf5c7f2e1992b (diff)
downloadmpd-3b5f83675a68e985dd7049df89a124402427747d.tar.gz
mpd-3b5f83675a68e985dd7049df89a124402427747d.tar.xz
mpd-3b5f83675a68e985dd7049df89a124402427747d.zip
let mpd add directories (just send the path)
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1581 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src')
-rw-r--r--src/screen_file.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/screen_file.c b/src/screen_file.c
index 2caf25197..ebde97096 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;
}