can't figure out search/find request format

Discuss client development (or even MPD development if you feel so inclined), ask questions about the client libs, MPD feature requests from client developers, etc...
Post Reply
sergi
Posts: 1
Joined: February 16th, 2021, 2:09 pm

can't figure out search/find request format

Post by sergi »

Hi,

I'm trying to use the search command, but I always get an error in response. The old request format works, but I'm testing against MPD 0.21 and 0.22, so the new format should work too. What I'm trying:

Code: Select all

search  (artist contains "red" )
ACK [2@0] {search} '==' or '!=' expected
search  (artist contains "red")
ACK [5@0] {} Space expected after closing '"'
search  ( artist contains "red" )
ACK [2@0] {search} Word expected
search  ( "artist" contains "red" )
ACK [2@0] {search} Word expected
What's the proper request format? I can't figure it out and most implementations seem to use the old

Code: Select all

search artist "red"
format.
max
Forum team
Posts: 1270
Joined: January 15th, 2013, 3:43 pm

Re: can't figure out search/find request format

Post by max »

Let's look at this example:

Code: Select all

search  (artist contains "red" )
This is a "search" command with 4 parameters (separated by spaces):
  • "(artist"
  • "contains"
  • "red"
  • ")"
This doesn't look right, does it?
The filter expression must be exactly one argument (see https://www.musicpd.org/doc/html/protocol.html#filters). You forgot to quote the expression.
Post Reply