Search for media nodes with metadata properties matching a search string.
#include <mmplayer/mmplayerclient.h> int mm_player_search( mmplayer_hdl_t *hdl, const int media_source_id, const char *filter, const char *search_term, const int offset, int *limit, mmp_ms_node_t **media_nodes )
Search the media source identified by media_source_id for media nodes with metadata properties matching a search string. The filter parameter lets you list which properties are examined. You can set this field to NULL to examine all properties. Otherwise, this parameter must reference a JSON-formatted string that lists the properties between square brackets:
["artist","album","genre","song","video"]
The search_term parameter contains the text to match; regular expressions or wildcards aren't supported so it must be an exact match.
You can set offset to make mm-player search media nodes starting from a certain index within the set of child items (i.e., contained media nodes) in the root of the media source being searched. You can also set limit to restrict how many child items can be returned.
The library allocates memory for media_nodes but it's the caller's responsibility to later deallocate that memory.
0 on success, -1 on failure