aboutsummaryrefslogtreecommitdiffstats
path: root/src/command/AllCommands.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-10-25 23:49:35 +0200
committerMax Kellermann <max@duempel.org>2014-10-25 23:50:47 +0200
commit575fbad254a1ce67530bf2aedc9852c89c072c3f (patch)
tree612ed62b05b787ee737baaca7c87d99a3bbae7cc /src/command/AllCommands.cxx
parentfa0aa91bf9e412e121d538632cbce3cce08ea0e0 (diff)
downloadmpd-575fbad254a1ce67530bf2aedc9852c89c072c3f.tar.gz
mpd-575fbad254a1ce67530bf2aedc9852c89c072c3f.tar.xz
mpd-575fbad254a1ce67530bf2aedc9852c89c072c3f.zip
AllCommands: "commands" returns playlist commands only if playlist_directory configured
Diffstat (limited to 'src/command/AllCommands.cxx')
-rw-r--r--src/command/AllCommands.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/command/AllCommands.cxx b/src/command/AllCommands.cxx
index 6a4b18198..be3a343a5 100644
--- a/src/command/AllCommands.cxx
+++ b/src/command/AllCommands.cxx
@@ -210,6 +210,16 @@ command_available(gcc_unused const Partition &partition,
return neighbor_commands_available(partition.instance);
#endif
+ if (strcmp(cmd->cmd, "save") == 0 ||
+ strcmp(cmd->cmd, "rm") == 0 ||
+ strcmp(cmd->cmd, "rename") == 0 ||
+ strcmp(cmd->cmd, "playlistdelete") == 0 ||
+ strcmp(cmd->cmd, "playlistmove") == 0 ||
+ strcmp(cmd->cmd, "playlistclear") == 0 ||
+ strcmp(cmd->cmd, "playlistadd") == 0 ||
+ strcmp(cmd->cmd, "listplaylists") == 0)
+ return playlist_commands_available();
+
return true;
}