From 575fbad254a1ce67530bf2aedc9852c89c072c3f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 25 Oct 2014 23:49:35 +0200 Subject: AllCommands: "commands" returns playlist commands only if playlist_directory configured --- src/command/AllCommands.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/command/AllCommands.cxx') 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; } -- cgit v1.2.3