Skip to content

Commit

Permalink
This commit adds the sort and window parameter to "sticker find"
Browse files Browse the repository at this point in the history
The two new compare operators "gt" and "lt" are casting the values to int.

Sort supports:
- uri: sort by uri
- value: sort by value as string
- value_int: casts value to int

This is an attempt to fix MusicPlayerDaemon#1894.
  • Loading branch information
jcorporation committed Nov 23, 2023
1 parent ef586fa commit affc1e7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ ver 0.24 (not yet released)
- new command "stickernames"
- new "search"/"find" filter "added-since"
- "sticker find" supports sort and window parameter
- "sticker find" supports integer comparision
* database
- attribute "added" shows when each song was added to the database
- proxy: require MPD 0.21 or later
Expand Down
4 changes: 2 additions & 2 deletions doc/protocol.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1468,15 +1468,15 @@ the database for songs).
For each matching song, it prints the URI and that one
sticker's value.

``sort`` sorts the result by "``uri``" or "``value``". [#since_0_24]_
``sort`` sorts the result by "``uri``","``value`` or "``value_int``" (casts the sticker value to an integer). [#since_0_24]_

.. _command_sticker_find_value:

:command:`sticker find {TYPE} {URI} {NAME} = {VALUE} [sort {SORTTYPE}] [window {START:END}]`
Searches for stickers with the given value.

Other supported operators are:
"``<``", "``>``"
"``<``", "``>``" for strings and "``lt``", "``gt``" to cast the value to an integer.

Examples:

Expand Down

0 comments on commit affc1e7

Please sign in to comment.