diff --git a/doc/protocol.xml b/doc/protocol.xml
index b2f26deb0..dbd0738c0 100644
--- a/doc/protocol.xml
+++ b/doc/protocol.xml
@@ -195,6 +195,78 @@
+
+ Filters
+
+
+ All commands which search for songs (e.g. find and
+ searchadd)
+ share a common filter syntax:
+
+
+
+ find
+
+ TYPE
+ VALUE
+
+
+
+
+ TYPE can
+ be any tag supported by MPD, or one of the special
+ parameters:
+
+
+
+
+
+ any checks all tag values
+
+
+
+
+
+ file checks the full path
+ (relative to the music directory)
+
+
+
+
+
+ base restricts the search to
+ songs in the given directory (also relative to the
+ music directory)
+
+
+
+
+
+ modified-since compares the
+ file's time stamp with the given value (ISO 8601 or
+ UNIX time stamp)
+
+
+
+
+
+ albumartist looks for
+ VALUE in AlbumArtist and falls back to
+ Artist tags if AlbumArtist does not exist.
+
+
+
+
+
+ VALUE is what to find. The
+ find commands specify an exact value and
+ are case-sensitive; the search commands
+ specify a sub string and ignore case.
+
+
+
Tags
@@ -1685,17 +1757,16 @@ OK
count
- TAG
- NEEDLE
- ...
+ FILTERgroupGROUPTYPE
- Counts the number of songs and their total playtime in
- the db matching TAG exactly. The
+ Count the number of songs and their total playtime in
+ the database matching FILTER (see
+ Filters). The
following prints the number of songs whose title matches
"Echoes":
@@ -1716,65 +1787,16 @@ OK
find
- TYPE
- WHAT
- ...
+ FILTERsort TYPEwindow START:END
- Finds songs in the db that are exactly
- WHAT.
-
-
- TYPE can
- be any tag supported by MPD, or one of the special
- parameters:
-
-
-
-
-
- any checks all tag values
-
-
-
-
-
- file checks the full path
- (relative to the music directory)
-
-
-
-
-
- base restricts the search to
- songs in the given directory (also relative to the
- music directory)
-
-
-
-
-
- modified-since compares the
- file's time stamp with the given value (ISO 8601 or
- UNIX time stamp)
-
-
-
-
-
- albumartist looks for
- WHAT in AlbumArtist and falls back to
- Artist tags if AlbumArtist does not exist.
-
-
-
-
-
- WHAT is what to find.
+ Search the database for songs matching
+ FILTER (see Filters).
@@ -1804,16 +1826,16 @@ OK
findadd
- TYPE
- WHAT
- ...
+ FILTER
- Finds songs in the db that are exactly
- WHAT and adds them to current
- playlist. Parameters have the same meaning as for FILTER (see Filters) and add them to
+ the queue. Parameters have the same meaning as for
+ find.
@@ -1824,9 +1846,7 @@ OK
listTYPE
- FILTERTYPE
- FILTERWHAT
- ...
+ FILTERgroupGROUPTYPE...
@@ -1840,10 +1860,8 @@ OK
file.
- Additional arguments may specify a filter like the one
- in the find
- command.
+ Additional arguments may specify a filter.
The group keyword may be used
@@ -1994,18 +2012,17 @@ OK
search
- TYPE
- WHAT
- ...
+ FILTERsort TYPEwindow START:END
- Searches for any song that contains
- WHAT. Parameters have the same
- meaning as for FILTER (see Filters). Parameters
+ have the same meaning as for find,
except that search is not case sensitive.
@@ -2015,15 +2032,15 @@ OK
searchadd
- TYPE
- WHAT
- ...
+ FILTER
- Searches for any song that contains WHAT
- in tag TYPE and adds them to current playlist.
+ Search the database for songs matching
+ FILTER (see Filters) and add them to
+ the queue.
Parameters have the same meaning as for
searchaddplNAME
- TYPE
- WHAT
- ...
+ FILTER
- Searches for any song that contains WHAT
- in tag TYPE and adds them to the playlist
- named NAME.
+ Search the database for songs matching
+ FILTER (see Filters) and add them to
+ the playlist named NAME.
If a playlist by that name doesn't exist it is created.