<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Mpd__Queue (libmpdclient.Mpd__Queue)</title><link rel="stylesheet" href="../odoc.css"/><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> – <a href="../index.html">libmpdclient</a> &#x00BB; Mpd__Queue</nav><h1>Module <code>Mpd__Queue</code></h1><p>Module for Mpd current playlist manipulation.</p></header><dl><dt class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><code><span class="keyword">type </span>t</code><code><span class="keyword"> = </span></code><table class="variant"><tr id="type-t.PlaylistError" class="anchored"><td class="def constructor"><a href="#type-t.PlaylistError" class="anchor"></a><code><span class="keyword">| </span></code><code><span class="constructor">PlaylistError</span><span class="keyword"> of </span>string</code></td></tr><tr id="type-t.Playlist" class="anchored"><td class="def constructor"><a href="#type-t.Playlist" class="anchor"></a><code><span class="keyword">| </span></code><code><span class="constructor">Playlist</span><span class="keyword"> of </span><a href="../Mpd/Song/index.html#type-t">Mpd.Song.t</a> list</code></td><td class="doc"><p>Playlist type.</p></td></tr></table></dt></dl><dl><dt class="spec value" id="val-add"><a href="#val-add" class="anchor"></a><code><span class="keyword">val </span>add : <a href="../Mpd/Client/index.html#type-t">Mpd.Client.t</a> <span>&#45;&gt;</span> string <span>&#45;&gt;</span> <a href="../Mpd/Protocol/index.html#type-response">Mpd.Protocol.response</a></code></dt><dd><p>Add the file URI to the playlist (directories add recursively). URI can also be a single file.</p></dd></dl><dl><dt class="spec value" id="val-addid"><a href="#val-addid" class="anchor"></a><code><span class="keyword">val </span>addid : <a href="../Mpd/Client/index.html#type-t">Mpd.Client.t</a> <span>&#45;&gt;</span> string <span>&#45;&gt;</span> int <span>&#45;&gt;</span> int</code></dt><dd><p>Add a song to the playlist (non-recursive) and returns the song id. URI is always a single file or URL.</p></dd></dl><dl><dt class="spec value" id="val-clear"><a href="#val-clear" class="anchor"></a><code><span class="keyword">val </span>clear : <a href="../Mpd/Client/index.html#type-t">Mpd.Client.t</a> <span>&#45;&gt;</span> <a href="../Mpd/Protocol/index.html#type-response">Mpd.Protocol.response</a></code></dt><dd><p>Clear the current playlist.</p></dd></dl><dl><dt class="spec value" id="val-delete"><a href="#val-delete" class="anchor"></a><code><span class="keyword">val </span>delete : <a href="../Mpd/Client/index.html#type-t">Mpd.Client.t</a> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> ?&#8288;position_end:int <span>&#45;&gt;</span> unit <span>&#45;&gt;</span> <a href="../Mpd/Protocol/index.html#type-response">Mpd.Protocol.response</a></code></dt><dd><p>Delete 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.</p></dd></dl><dl><dt class="spec value" id="val-deleteid"><a href="#val-deleteid" class="anchor"></a><code><span class="keyword">val </span>deleteid : <a href="../Mpd/Client/index.html#type-t">Mpd.Client.t</a> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <a href="../Mpd/Protocol/index.html#type-response">Mpd.Protocol.response</a></code></dt><dd><p>Delete the song SONGID from the playlist.</p></dd></dl><dl><dt class="spec value" id="val-move"><a href="#val-move" class="anchor"></a><code><span class="keyword">val </span>move : <a href="../Mpd/Client/index.html#type-t">Mpd.Client.t</a> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> ?&#8288;position_end:int <span>&#45;&gt;</span> int <span>&#45;&gt;</span> unit <span>&#45;&gt;</span> <a href="../Mpd/Protocol/index.html#type-response">Mpd.Protocol.response</a></code></dt><dd><p>Move the song at FROM or range of songs at START:END to TO in the playlist.</p></dd></dl><dl><dt class="spec value" id="val-moveid"><a href="#val-moveid" class="anchor"></a><code><span class="keyword">val </span>moveid : <a href="../Mpd/Client/index.html#type-t">Mpd.Client.t</a> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <a href="../Mpd/Protocol/index.html#type-response">Mpd.Protocol.response</a></code></dt><dd><p>Move 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).</p></dd></dl><dl><dt class="spec value" id="val-playlist"><a href="#val-playlist" class="anchor"></a><code><span class="keyword">val </span>playlist : <a href="../Mpd/Client/index.html#type-t">Mpd.Client.t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>Get the songs in the playlist</p></dd></dl><dl><dt class="spec value" id="val-playlistid"><a href="#val-playlistid" class="anchor"></a><code><span class="keyword">val </span>playlistid : <a href="../Mpd/Client/index.html#type-t">Mpd.Client.t</a> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> (<a href="../Mpd/Song/index.html#type-t">Mpd.Song.t</a>, string) Stdlib.result</code></dt><dd><p>Get information for one song</p></dd></dl><dl><dt class="spec value" id="val-playlistfind"><a href="#val-playlistfind" class="anchor"></a><code><span class="keyword">val </span>playlistfind : <a href="../Mpd/Client/index.html#type-t">Mpd.Client.t</a> <span>&#45;&gt;</span> string <span>&#45;&gt;</span> string <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>Find songs in the current playlist with strict matching.</p></dd></dl><dl><dt class="spec value" id="val-playlistsearch"><a href="#val-playlistsearch" class="anchor"></a><code><span class="keyword">val </span>playlistsearch : <a href="../Mpd/Client/index.html#type-t">Mpd.Client.t</a> <span>&#45;&gt;</span> string <span>&#45;&gt;</span> string <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>Search case-insensitively for partial matches in the current playlist.</p></dd></dl><dl><dt class="spec value" id="val-swap"><a href="#val-swap" class="anchor"></a><code><span class="keyword">val </span>swap : <a href="../Mpd/Client/index.html#type-t">Mpd.Client.t</a> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <a href="../Mpd/Protocol/index.html#type-response">Mpd.Protocol.response</a></code></dt><dd><p>Swap the positions of SONG1 and SONG2.</p></dd></dl><dl><dt class="spec value" id="val-shuffle"><a href="#val-shuffle" class="anchor"></a><code><span class="keyword">val </span>shuffle : <a href="../Mpd/Client/index.html#type-t">Mpd.Client.t</a> <span>&#45;&gt;</span> ?&#8288;range:(int<span class="keyword"> * </span>int) <span>&#45;&gt;</span> unit <span>&#45;&gt;</span> <a href="../Mpd/Protocol/index.html#type-response">Mpd.Protocol.response</a></code></dt><dd><p>Shuffle the current playlist. START:END is optional and specifies a range of songs.</p></dd></dl><dl><dt class="spec value" id="val-prio"><a href="#val-prio" class="anchor"></a><code><span class="keyword">val </span>prio : <a href="../Mpd/Client/index.html#type-t">Mpd.Client.t</a> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> ?&#8288;range:(int<span class="keyword"> * </span>int) <span>&#45;&gt;</span> unit <span>&#45;&gt;</span> <a href="../Mpd/Protocol/index.html#type-response">Mpd.Protocol.response</a></code></dt><dd><p>Set the priority of the specified songs. A higher priority means that it will be played first when &quot;random&quot; mode is enabled. A priority is an integer between 0 and 255. The default priority of new songs is 0.</p></dd></dl><dl><dt class="spec value" id="val-prioid"><a href="#val-prioid" class="anchor"></a><code><span class="keyword">val </span>prioid : <a href="../Mpd/Client/index.html#type-t">Mpd.Client.t</a> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> int list <span>&#45;&gt;</span> <a href="../Mpd/Protocol/index.html#type-response">Mpd.Protocol.response</a></code></dt><dd><p>Same as prio, but address the songs with their id.</p></dd></dl><dl><dt class="spec value" id="val-swapid"><a href="#val-swapid" class="anchor"></a><code><span class="keyword">val </span>swapid : <a href="../Mpd/Client/index.html#type-t">Mpd.Client.t</a> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <a href="../Mpd/Protocol/index.html#type-response">Mpd.Protocol.response</a></code></dt><dd><p>Swap the positions of SONG1 and SONG2 (both song ids).</p></dd></dl><dl><dt class="spec value" id="val-rangeid"><a href="#val-rangeid" class="anchor"></a><code><span class="keyword">val </span>rangeid : <a href="../Mpd/Client/index.html#type-t">Mpd.Client.t</a> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> ?&#8288;range:(float<span class="keyword"> * </span>float) <span>&#45;&gt;</span> unit <span>&#45;&gt;</span> <a href="../Mpd/Protocol/index.html#type-response">Mpd.Protocol.response</a></code></dt><dd><p>Specify 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 &quot;:&quot;) means &quot;remove the range, play everything&quot;. A song that is currently playing cannot be manipulated this way.</p></dd></dl><dl><dt class="spec value" id="val-cleartagid"><a href="#val-cleartagid" class="anchor"></a><code><span class="keyword">val </span>cleartagid : <a href="../Mpd/Client/index.html#type-t">Mpd.Client.t</a> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> string <span>&#45;&gt;</span> <a href="../Mpd/Protocol/index.html#type-response">Mpd.Protocol.response</a></code></dt><dd><p>Remove 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.</p></dd></dl></div></body></html>