aboutsummaryrefslogtreecommitdiffstats
path: root/src/command/QueueCommands.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-10-27 20:35:40 +0100
committerMax Kellermann <max@duempel.org>2015-10-27 20:35:40 +0100
commit8acf996d90e3be551ebffc98de7248a5bee5b69c (patch)
tree9e38e0b05fa274814c0bbc112bfcef38ecdd1137 /src/command/QueueCommands.cxx
parent15e432204e62dd5a1c873af13a679195b9645b0c (diff)
downloadmpd-8acf996d90e3be551ebffc98de7248a5bee5b69c.tar.gz
mpd-8acf996d90e3be551ebffc98de7248a5bee5b69c.tar.xz
mpd-8acf996d90e3be551ebffc98de7248a5bee5b69c.zip
command/queue: add range parameter to plchanges and plchangesposid
Diffstat (limited to 'src/command/QueueCommands.cxx')
-rw-r--r--src/command/QueueCommands.cxx14
1 files changed, 12 insertions, 2 deletions
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;
}