MPD icon indicating copy to clipboard operation
MPD copied to clipboard

Add ability to find sticker key with a specific value/range

Open khaytsus opened this issue 6 years ago • 5 comments

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!

khaytsus avatar Feb 08 '20 17:02 khaytsus

Since this feature needs to be implemented on the server, I've moved it from mpc to MPD.

MaxKellermann avatar Feb 10 '20 08:02 MaxKellermann

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?

khaytsus avatar Oct 17 '20 17:10 khaytsus

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 avatar Oct 16 '22 22:10 jcorporation

@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!

khaytsus avatar Mar 01 '23 14:03 khaytsus

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.

jcorporation avatar Oct 21 '23 18:10 jcorporation