Module Mpd.Utils
type item_id
=
|
Simple of int
|
Num_on_num of int * int
Type that can save the id of an element which can be an int or two int
val num_on_num_parse : string -> item_id
Split string like "8/14" to 8 and 14, returns (-1, -1) if it fails. * is used in track and disc tab of the song data
type pair
=
{
key : string;
value : string;
}
Create a type used when splitting a line which has the form key: value . * This type is used by Mpd.Utils.read_key_val.
val read_key_val : string -> pair
Split a line with the form "k: v" in the value of type pair
val values_of_pairs : string list -> string list
Returns all the values of a list of strings that have the key/value form.
val bool_of_int_str : string -> bool
Get a boolean value from a string number. The string "0" is false while all * other string is true.
val read_file_paths : string -> string list
Get the file path from the ouput of the command "listplaylist name"
val read_list_playlists : string -> string list
Get playlists list from output of the command "listplaylists".