Module Mpd.Queue
type t=|PlaylistError of string|Playlist of Song.t listPlaylist type.
val add : Client.t -> string -> Protocol.responseAdd the file URI to the playlist (directories add recursively). URI can also be a single file.
val addid : Client.t -> string -> int -> intAdd a song to the playlist (non-recursive) and returns the song id. URI is always a single file or URL.
val clear : Client.t -> Protocol.responseClear the current playlist.
val delete : Client.t -> int -> ?position_end:int -> unit -> Protocol.responseDelete a song or a set of songs from the playlist. The song or the range of songs are identified by the position in the playlist.
val deleteid : Client.t -> int -> Protocol.responseDelete the song SONGID from the playlist.
val move : Client.t -> int -> ?position_end:int -> int -> unit -> Protocol.responseMove the song at FROM or range of songs at START:END to TO in the playlist.
val moveid : Client.t -> int -> int -> Protocol.responseMove the song with FROM (songid) to TO (playlist index) in the playlist. If TO is negative, it is relative to the current song in the playlist (if there is one).
val playlistfind : Client.t -> string -> string -> tFind songs in the current playlist with strict matching.
val playlistsearch : Client.t -> string -> string -> tSearch case-insensitively for partial matches in the current playlist.
val swap : Client.t -> int -> int -> Protocol.responseSwap the positions of SONG1 and SONG2.
val shuffle : Client.t -> ?range:(int * int) -> unit -> Protocol.responseShuffle the current playlist. START:END is optional and specifies a range of songs.
val prio : Client.t -> int -> ?range:(int * int) -> unit -> Protocol.responseSet the priority of the specified songs. A higher priority means that it will be played first when "random" mode is enabled. A priority is an integer between 0 and 255. The default priority of new songs is 0.
val prioid : Client.t -> int -> int list -> Protocol.responseSame as prio, but address the songs with their id.
val swapid : Client.t -> int -> int -> Protocol.responseSwap the positions of SONG1 and SONG2 (both song ids).
val rangeid : Client.t -> int -> ?range:(float * float) -> unit -> Protocol.responseSpecify the portion of the song that shall be played. START and END are offsets in seconds (fractional seconds allowed); both are optional. Omitting both (i.e. sending just ":") means "remove the range, play everything". A song that is currently playing cannot be manipulated this way.
val cleartagid : Client.t -> int -> string -> Protocol.responseRemove tags from the specified song. If TAG is not specified, then all tag values will be removed. Editing song tags is only possible for remote songs.