diff options
author | Max Kellermann <max@duempel.org> | 2009-09-30 23:13:13 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-09-30 23:13:13 +0200 |
commit | 31cabc751d2dc6721706d878a0694afc83ef6a0c (patch) | |
tree | 68a4f6b3d36d1ee3530d8ee9983f10f862ce624e /src/command.c | |
parent | 0478a8e2880a26f9993c5adeb10f29acc11deb72 (diff) | |
download | mpd-31cabc751d2dc6721706d878a0694afc83ef6a0c.tar.gz mpd-31cabc751d2dc6721706d878a0694afc83ef6a0c.tar.xz mpd-31cabc751d2dc6721706d878a0694afc83ef6a0c.zip |
command: range support for "delete"
Diffstat (limited to 'src/command.c')
-rw-r--r-- | src/command.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/command.c b/src/command.c index f69bdf632..165e21c96 100644 --- a/src/command.c +++ b/src/command.c @@ -632,13 +632,13 @@ handle_addid(struct client *client, int argc, char *argv[]) static enum command_return handle_delete(struct client *client, G_GNUC_UNUSED int argc, char *argv[]) { - int song; + unsigned start, end; enum playlist_result result; - if (!check_int(client, &song, argv[1], need_positive)) + if (!check_range(client, &start, &end, argv[1], need_range)) return COMMAND_RETURN_ERROR; - result = playlist_delete(&g_playlist, song); + result = playlist_delete_range(&g_playlist, start, end); return print_playlist_result(client, result); } |