summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <waker@users.sourceforge.net>2013-12-10 21:13:47 +0100
committerGravatar Alexey Yakovenko <waker@users.sourceforge.net>2013-12-10 21:13:47 +0100
commiteb2d14ec17066a64122c6b2a3e5496a1bb25f6d4 (patch)
tree5643682a5cd8ad351ac5caacaf3a86b26dd6fcc0 /main.c
parentc9f59e3b47ee5fd029d73c92d561d1688d7a5210 (diff)
core: fixed opening files into default playlist from cmdline
Diffstat (limited to 'main.c')
-rw-r--r--main.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/main.c b/main.c
index d5a7b83d..43019e15 100644
--- a/main.c
+++ b/main.c
@@ -283,12 +283,6 @@ server_exec_command_line (const char *cmdline, int len, char *sendback, int sbsi
parg++;
}
if (parg < pend) {
- playlist_t *curr_plt = plt_get_curr ();
- if (plt_add_files_begin (curr_plt, 0) != 0) {
- plt_unref (curr_plt);
- snprintf (sendback, sbsize, "it's not allowed to add files to playlist right now, because another file adding operation is in progress. please try again later.");
- return 0;
- }
if (conf_get_int ("cli_add_to_specific_playlist", 1)) {
char str[200];
conf_get_str ("cli_add_playlist_name", "Default", str, sizeof (str));
@@ -300,6 +294,12 @@ server_exec_command_line (const char *cmdline, int len, char *sendback, int sbsi
plt_set_curr_idx (idx);
}
}
+ playlist_t *curr_plt = plt_get_curr ();
+ if (plt_add_files_begin (curr_plt, 0) != 0) {
+ plt_unref (curr_plt);
+ snprintf (sendback, sbsize, "it's not allowed to add files to playlist right now, because another file adding operation is in progress. please try again later.");
+ return 0;
+ }
// add files
if (!queue) {
plt_clear (curr_plt);