diff options
Diffstat (limited to 'src/command')
-rw-r--r-- | src/command/AllCommands.cxx | 4 | ||||
-rw-r--r-- | src/command/QueueCommands.cxx | 14 |
2 files changed, 14 insertions, 4 deletions
diff --git a/src/command/AllCommands.cxx b/src/command/AllCommands.cxx index 8e8865ff3..87ed7a1dc 100644 --- a/src/command/AllCommands.cxx +++ b/src/command/AllCommands.cxx @@ -148,8 +148,8 @@ static constexpr struct command commands[] = { { "playlistinfo", PERMISSION_READ, 0, 1, handle_playlistinfo }, { "playlistmove", PERMISSION_CONTROL, 3, 3, handle_playlistmove }, { "playlistsearch", PERMISSION_READ, 2, -1, handle_playlistsearch }, - { "plchanges", PERMISSION_READ, 1, 1, handle_plchanges }, - { "plchangesposid", PERMISSION_READ, 1, 1, handle_plchangesposid }, + { "plchanges", PERMISSION_READ, 1, 2, handle_plchanges }, + { "plchangesposid", PERMISSION_READ, 1, 2, handle_plchangesposid }, { "previous", PERMISSION_CONTROL, 0, 0, handle_previous }, { "prio", PERMISSION_CONTROL, 2, -1, handle_prio }, { "prioid", PERMISSION_CONTROL, 2, -1, handle_prioid }, diff --git a/src/command/QueueCommands.cxx b/src/command/QueueCommands.cxx index 7751aa26d..141c5170a 100644 --- a/src/command/QueueCommands.cxx +++ b/src/command/QueueCommands.cxx @@ -251,8 +251,13 @@ handle_plchanges(Client &client, Request args, Response &r) if (!ParseCommandArg32(r, version, args.front())) return CommandResult::ERROR; + RangeArg range = RangeArg::All(); + if (!args.ParseOptional(1, range, r)) + return CommandResult::ERROR; + playlist_print_changes_info(r, client.partition, - client.playlist, version); + client.playlist, version, + range.start, range.end); return CommandResult::OK; } @@ -263,7 +268,12 @@ handle_plchangesposid(Client &client, Request args, Response &r) if (!ParseCommandArg32(r, version, args.front())) return CommandResult::ERROR; - playlist_print_changes_position(r, client.playlist, version); + RangeArg range = RangeArg::All(); + if (!args.ParseOptional(1, range, r)) + return CommandResult::ERROR; + + playlist_print_changes_position(r, client.playlist, version, + range.start, range.end); return CommandResult::OK; } |