|
libmpd
11.8.17
|
Functions | |
| void | mpd_database_search_add_constraint (MpdObj *mi, mpd_TagItems field, const char *value) |
| void | mpd_database_search_start (MpdObj *mi, int exact) |
| void | mpd_database_search_field_start (MpdObj *mi, mpd_TagItems field) |
| MpdData * | mpd_database_search_commit (MpdObj *mi) |
The following functions provide an interface to the improved search capabilities of mpd 0.12.0.
| void mpd_database_search_add_constraint | ( | MpdObj * | mi, |
| mpd_TagItems | field, | ||
| const char * | value | ||
| ) |
| mi | A MpdObj |
| field | A mpd_TagItems |
| value | a string that field needs to match |
Adds a constraint to the search
| void mpd_database_search_field_start | ( | MpdObj * | mi, |
| mpd_TagItems | field | ||
| ) |
| mi | a MpdObj |
| field | a mpd_TagItems |
Starts a field search, eg. if you want a list of all albums, you do;
You can add constraints using mpd_database_search_add_constraint, for example if you want all albums by eric clapton:
| void mpd_database_search_start | ( | MpdObj * | mi, |
| int | exact | ||
| ) |
| mi | A MpdObj |
| exact | a boolean indicating if the search is fuzzy or exact |
Starts a search, you can add "constraints" by calling mpd_database_search_add_constraint For Example if you want all songs by Eric Clapton you could do:
If you only want the songs from the album unplugged:
This function requires mpd 0.12.0 or higher