command/QueueCommands: support relative offsets in "addid"

A similar feature was present long ago in MPD, but was deprecated in
version 0.16 because the implementation was broken.  This commit
re-adds the feature in a way that's well-defined and not broken.

Close https://github.com/MusicPlayerDaemon/MPD/issues/1221
This commit is contained in:
Max Kellermann
2021-10-07 21:27:35 +02:00
parent 16cad48641
commit 3993176b76
3 changed files with 39 additions and 1 deletions

View File

@@ -709,6 +709,12 @@ Whenever possible, ids should be used.
Id: 999
OK
If the second parameter is given, then the song is inserted at the
specified position. If the parameter starts with ``+`` or ``-``,
then it is relative to the current song; e.g. ``+1`` inserts right
after the current song and ``-1`` inserts right before the current
song. (``±0`` is not a legal value.)
.. _command_clear:
:command:`clear`