Add ability to find sticker key with a specific value/range
I'd like to be able to ask mpc to return songs with a sticker key with a specific value, my specific need is to find a sticker key named "rating" that is greater than or equal to a value, ie something like this:
mpc sticker "" find "rating>=6"
Finding all files with a given key, ie: mpc sticker "" find rating works fine, but can mpc return only specific results? It already has many other options in find/search to get specific song attributes, being able to filter the sticker keys would be terrific. Thank you!
Since this feature needs to be implemented on the server, I've moved it from mpc to MPD.
Did this make it into 22? I am offhand not seeing it in the changelog, if it did could you give me a hint on usage?
From MPD protocol documentation:
sticker find {TYPE} {URI} {NAME} = {VALUE} Searches for stickers with the given value. Other supported operators are: “<”, “>”
I quickly tried it at protocol level and it works like documented.
It is not implemented in mpc.
@MaxKellermann: could you move it back to mpc?
@jcorporation @MaxKellermann Ping on this issue; did this ever get into mpc to provide the ability for mpc to search for sticker values? Something like mpc sticker Rock find "rating" works to find all songs with that sticker at all, but this does not find those with a rating of greater than 3: mpc sticker Rock find "rating>3"
Thank you!
I made a pull request for libmpdclient to support this: https://github.com/MusicPlayerDaemon/libmpdclient/pull/109
After it is merged the functionality can be implemented in mpc.