diff options
author | Max Kellermann <max@musicpd.org> | 2019-03-14 19:50:09 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2019-03-14 19:50:09 +0100 |
commit | 59fdfd25cbfc82cd5bad92d26b9d904b8f81014b (patch) | |
tree | f89e6ac50c870778f9af6fe5a4c7fbe2aacd043f /src | |
parent | 0d98677212f7d4b1308f140b8979d32c6a96aad6 (diff) |
command/database: fix "list" with filter expression
Disable the 0.11 compatibility mode if the only argument is a filter
expression.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/506
Diffstat (limited to 'src')
-rw-r--r-- | src/command/DatabaseCommands.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/command/DatabaseCommands.cxx b/src/command/DatabaseCommands.cxx index 907e2e6fb..6fc9fa8ac 100644 --- a/src/command/DatabaseCommands.cxx +++ b/src/command/DatabaseCommands.cxx @@ -268,7 +268,10 @@ handle_list(Client &client, Request args, Response &r) std::unique_ptr<SongFilter> filter; TagType group = TAG_NUM_OF_ITEM_TYPES; - if (args.size == 1) { + if (args.size == 1 && + /* parantheses are the syntax for filter expressions: no + compatibility mode */ + args.front()[0] != '(') { /* for compatibility with < 0.12.0 */ if (tagType != TAG_ALBUM) { r.FormatError(ACK_ERROR_ARG, |