From b159bc0c5f64dd4030f18cfa38539c5851d5157d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 19 Jul 2011 00:34:33 +0200 Subject: queue: implement song "priorities" Sorts remaining songs by priority. This can be used for the much-demanded "queue feature". --- doc/protocol.xml | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) (limited to 'doc') diff --git a/doc/protocol.xml b/doc/protocol.xml index affe852c..aba080a6 100644 --- a/doc/protocol.xml +++ b/doc/protocol.xml @@ -203,6 +203,47 @@ + + Recipes + +
+ Queuing + + + Often, users run MPD with "random" enabled, but want to + be able to insert songs "before" the rest of the playlist. + That is commonly called "queuing". + + + + MPD implements this by allowing the client to specify a + "priority" for each song in the playlist (commands prio and + prioid). A + higher priority means that the song is going to be played + before the other songs. + + + + In "random" mode, MPD maintains an internal randomized + sequence of songs. In this sequence, songs with a higher + priority come first, and all songs with the same priority are + shuffled (by default, all songs are shuffled, because all have + the same priority "0"). When you increase the priority of a + song, it is moved to the front of the sequence according to + its new priority, but always after the current one. A song + that has been played already (it's "before" the current song + in that sequence) will only be scheduled for repeated playback + if its priority has become bigger than the priority of the + current song. Decreasing the priority of a song will moved it + farther to the end of the sequence. Changing the priority of + the current song has no effect on the sequence. + +
+
+ Command reference @@ -1092,6 +1133,46 @@ OK + + + + + prio + PRIORITY + START:END + + + + + Set 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. + + + + + + + + prioid + PRIORITY + ID + + + + + Same as prio, + but address the songs with their id. + + + + -- cgit v1.2.3