summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-08-29 19:44:28 +0200
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-08-29 19:44:28 +0200
commitf61d17119ceb939ec9b840dc39a6a064b11668a8 (patch)
tree6195644729abc7ccb2eee6ee44988fed290155f6 /main.c
parentcb82c2caec2ac65722d65ccc1b3768cd6f69d915 (diff)
gtkui plugin overrides pl_add_file and pl_add_dir API functions and shows progress dialog
Diffstat (limited to 'main.c')
-rw-r--r--main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/main.c b/main.c
index 601a8e0b..3c06e3fa 100644
--- a/main.c
+++ b/main.c
@@ -225,6 +225,9 @@ server_exec_command_line (const char *cmdline, int len, char *sendback, int sbsi
pl_clear ();
pl_reset_cursor ();
}
+ if (parg < pend) {
+ deadbeef->pl_add_files_begin ();
+ }
while (parg < pend) {
char resolved[PATH_MAX];
const char *pname;
@@ -234,14 +237,15 @@ server_exec_command_line (const char *cmdline, int len, char *sendback, int sbsi
else {
pname = parg;
}
- if (pl_add_dir (pname, NULL, NULL) < 0) {
- if (pl_add_file (pname, NULL, NULL) < 0) {
+ if (deadbeef->pl_add_dir (pname, NULL, NULL) < 0) {
+ if (deadbeef->pl_add_file (pname, NULL, NULL) < 0) {
fprintf (stderr, "failed to add file or folder %s\n", pname);
}
}
parg += strlen (parg);
parg++;
}
+ deadbeef->pl_add_files_end ();
messagepump_push (M_PLAYLISTREFRESH, 0, 0, 0);
if (!queue) {
messagepump_push (M_PLAYSONG, 0, 1, 0);