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
This commit is contained in:
parent
0d98677212
commit
59fdfd25cb
1
NEWS
1
NEWS
|
@ -1,6 +1,7 @@
|
||||||
ver 0.21.6 (not yet released)
|
ver 0.21.6 (not yet released)
|
||||||
* protocol
|
* protocol
|
||||||
- allow loading playlists specified as absolute filesystem paths
|
- allow loading playlists specified as absolute filesystem paths
|
||||||
|
- fix "list" with filter expression
|
||||||
* input
|
* input
|
||||||
- cdio_paranoia: fix build failure due to missing #include
|
- cdio_paranoia: fix build failure due to missing #include
|
||||||
* playlist
|
* playlist
|
||||||
|
|
|
@ -268,7 +268,10 @@ handle_list(Client &client, Request args, Response &r)
|
||||||
std::unique_ptr<SongFilter> filter;
|
std::unique_ptr<SongFilter> filter;
|
||||||
TagType group = TAG_NUM_OF_ITEM_TYPES;
|
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 */
|
/* for compatibility with < 0.12.0 */
|
||||||
if (tagType != TAG_ALBUM) {
|
if (tagType != TAG_ALBUM) {
|
||||||
r.FormatError(ACK_ERROR_ARG,
|
r.FormatError(ACK_ERROR_ARG,
|
||||||
|
|
Loading…
Reference in New Issue