summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-08-12 21:17:28 +0200
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-08-12 21:17:28 +0200
commit7be7cfb77696e8e952997f3daf44bc3a1fdf64be (patch)
tree2d3803867386c681292ca34331b5e6963db61d2b /main.c
parentac633ff319b0a1aaa0f3bc431249d3fe5a1971fd (diff)
added option to open files from command line in named playlist
Diffstat (limited to 'main.c')
-rw-r--r--main.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/main.c b/main.c
index dc85de51..601a8e0b 100644
--- a/main.c
+++ b/main.c
@@ -210,6 +210,16 @@ server_exec_command_line (const char *cmdline, int len, char *sendback, int sbsi
parg++;
}
if (parg < pend) {
+ if (conf_get_int ("cli_add_to_specific_playlist", 1)) {
+ const char *str = conf_get_str ("cli_add_playlist_name", "Default");
+ int idx = plt_find (str);
+ if (idx < 0) {
+ idx = plt_add (plt_get_count (), str);
+ }
+ if (idx >= 0) {
+ plt_set_curr (idx);
+ }
+ }
// add files
if (!queue && plt_get_curr () != -1) {
pl_clear ();