diff --git a/NEWS b/NEWS index 4503a78fe..c7ae36f2d 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ ver 0.23.1 (not yet released) * protocol - use decimal notation instead of scientific notation + - "load" supports relative positions * output - pipewire: attempt to change the graph sample rate - snapcast: fix time stamp bug which caused "Failed to get chunk" diff --git a/doc/protocol.rst b/doc/protocol.rst index b2be7c6d0..5c9dd5a1f 100644 --- a/doc/protocol.rst +++ b/doc/protocol.rst @@ -923,8 +923,9 @@ remote playlists (absolute URI with a supported scheme). only a part of the playlist. The ``POSITION`` parameter specifies where the songs will be - inserted into the queue. (This requires specifying the range as - well; the special value `0:` can be used if the whole playlist + inserted into the queue; it can be relative as described in + :ref:`addid `. (This requires specifying the range + as well; the special value `0:` can be used if the whole playlist shall be loaded at a certain queue position.) .. _command_playlistadd: diff --git a/meson.build b/meson.build index 40ee58763..17f81ed48 100644 --- a/meson.build +++ b/meson.build @@ -44,7 +44,7 @@ version_conf = configuration_data() version_conf.set_quoted('PACKAGE', meson.project_name()) version_conf.set_quoted('PACKAGE_NAME', meson.project_name()) version_conf.set_quoted('VERSION', meson.project_version()) -version_conf.set_quoted('PROTOCOL_VERSION', '0.23.0') +version_conf.set_quoted('PROTOCOL_VERSION', '0.23.1') configure_file(output: 'Version.h', configuration: version_conf) conf = configuration_data() diff --git a/src/command/PlaylistCommands.cxx b/src/command/PlaylistCommands.cxx index cd3579aa6..8c6c45ddf 100644 --- a/src/command/PlaylistCommands.cxx +++ b/src/command/PlaylistCommands.cxx @@ -19,6 +19,7 @@ #include "config.h" #include "PlaylistCommands.hxx" +#include "PositionArg.hxx" #include "Request.hxx" #include "Instance.hxx" #include "db/Selection.hxx" @@ -86,7 +87,7 @@ handle_load(Client &client, Request args, [[maybe_unused]] Response &r) const unsigned old_size = playlist.GetLength(); const unsigned position = args.size > 2 - ? args.ParseUnsigned(2, old_size) + ? ParseInsertPosition(args[2], partition.playlist) : old_size; const SongLoader loader(client);