aboutsummaryrefslogtreecommitdiff
path: root/src/QueueCommands.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-08-29 19:27:03 +0200
committerMax Kellermann <max@duempel.org>2012-08-29 20:19:02 +0200
commit333d226ed0044cf6a6387e03805be2d7f6dac6f2 (patch)
tree7acb6fc795fcd2bb8aa75c16172de1ff7a761e8f /src/QueueCommands.cxx
parent04a9dec9525a58d077da71a84655cb45b7838520 (diff)
SongFilter: convert to a C++ class
Diffstat (limited to 'src/QueueCommands.cxx')
-rw-r--r--src/QueueCommands.cxx11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/QueueCommands.cxx b/src/QueueCommands.cxx
index c47454e0..5dac6a8a 100644
--- a/src/QueueCommands.cxx
+++ b/src/QueueCommands.cxx
@@ -246,18 +246,13 @@ static enum command_return
handle_playlist_match(struct client *client, int argc, char *argv[],
bool fold_case)
{
- struct locate_item_list *list =
- locate_item_list_parse(argv + 1, argc - 1, fold_case);
-
- if (list == NULL) {
+ SongFilter filter;
+ if (!filter.Parse(argc - 1, argv + 1, fold_case)) {
command_error(client, ACK_ERROR_ARG, "incorrect arguments");
return COMMAND_RETURN_ERROR;
}
- playlist_print_find(client, &g_playlist, list);
-
- locate_item_list_free(list);
-
+ playlist_print_find(client, &g_playlist, filter);
return COMMAND_RETURN_OK;
}