Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
31151cec
Commit
31151cec
authored
Oct 18, 2021
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
command/playlist: "load" supports relative positions
This commit also increases the PROTOCOL_VERSION so clients can detect the availability of the feature.
parent
07e8c338
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
4 deletions
+7
-4
NEWS
NEWS
+1
-0
protocol.rst
doc/protocol.rst
+3
-2
meson.build
meson.build
+1
-1
PlaylistCommands.cxx
src/command/PlaylistCommands.cxx
+2
-1
No files found.
NEWS
View file @
31151cec
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"
...
...
doc/protocol.rst
View file @
31151cec
...
...
@@ -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 <command_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:
...
...
meson.build
View file @
31151cec
...
...
@@ -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()
...
...
src/command/PlaylistCommands.cxx
View file @
31151cec
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment