From 7e7cbe22cb0f403ae876c5439dd12f5e6bab4fbc Mon Sep 17 00:00:00 2001 From: Warren Dukes Date: Sun, 13 Jun 2004 13:58:44 +0000 Subject: [PATCH] more MPD-Protocol.xml progress git-svn-id: https://svn.musicpd.org/mpd/trunk@1463 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- doc/MPD-Protocol.xml | 49 +++++++++++++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 16 deletions(-) diff --git a/doc/MPD-Protocol.xml b/doc/MPD-Protocol.xml index 25975a91e..a61003577 100644 --- a/doc/MPD-Protocol.xml +++ b/doc/MPD-Protocol.xml @@ -109,10 +109,21 @@ list album someArtistlist Playlist: Adding, Deleting, and Managment - Additional Song Metadata + Additional Song Metadata + In addition to the same song metadata returned when browsing, songs in a playlist have two additional metadata elements. Pos is the position in the playlist of the song and Id is the playlist id for a song (each song in the playlist has a unique Id, even if there is a duplicate entry for the same file).file: directory/song +Artist: famousArtist +Title: popularSong +Num: 0 +Id: 23 +file: directory/song +Artist: famouseArtist +Title: popularSong +Num: 1 +Id: 132 - Song ID's vs Playlist Position + Song ID's vs Playlist Position + When implementing a client for MPD, the developer must keep in mind that multiple clients maybe manipulating the playlist simultaneously. Thus, its essential to use playlist song id's instead of the playlist position for manipulating the playlist. This is due to the fact that another client maybe moving, deleting, etc... songs in the playlist, thus changing the order and positions of songs in the playlist. Consequently, using song id's is a safer method for manipulating the playlist as the song id's do not depend on the order and positions of songs in the playlist. @@ -120,64 +131,70 @@ list album <emphasis>someArtist</emphasis></programlisting><literal>list</litera playlistinfo playlistinfo -1 -playlistinfo position +playlistinfo positionplaylistinfo responds with the information about songs in the playlist. If no argument is passed to playlistinfo or an argument of -1 is passed, then every song in the playlist is returned. If a playlist position is passed to playlistinfo, then the information about the song at position is returned. Note: It's suggest that + playlistid + be used instead of playlistinfo. - - + <sect3 id="playlistinfo"> + <title id="playlistid"> <literal>playlistid</literal> playlistid playlistid -1 -playlistid id +playlistid idplaylistid is the same as + playlistinfo + except that using optional argument id causes the information for the song with the playlist song ID idto be returned. <literal>plchanges</literal> - plchanges version + plchanges versionplchanges responds with the song information for songs that have changed since the playlist version version. Note, to detect songs that were removed at the end of the playlist, use the playlist length returned by status. - + <title id="deleteid"> <literal>deleteid</literal> - deleteid id + deleteid iddeleteid removes the song with the playlist song id id from the playlist. <literal>delete</literal> - delete position + delete positiondelete removes the song at the playlist position position from the playlist. Note: It's suggested that + deleteid + be used instead of delete. <literal>add</literal> add file -add url +add urladd appends the file or url to the end of the playlist <literal>moveid</literal> - movid id + movid id position <literal>move</literal> - move position + move position position <literal>swapid</literal> - swapid id + swapid id1 id2 <literal>swap</literal> - swap position + swap position1 position2 @@ -207,7 +224,7 @@ add <emphasis>url</emphasis></programlisting></para> <sect2> <title>Status Queries - + <title id="status"> <literal>status</literal> status