diff --git a/src/main/lkt.c b/src/main/lkt.c index 5d8647b6f637ec98d5a15ef2a609c1799b7f5e78..ee8bd03b460f497cc3e0adc59b8c83768990f390 100644 --- a/src/main/lkt.c +++ b/src/main/lkt.c @@ -71,12 +71,14 @@ help(void) " add <query>: add to the queue and prints the results of the query.\n" " insert <query>: insert on top of the aueue and prints the results of the query.\n" " plt <plt> <query>: search inside a playlist and prints the results.\n" + " count <query>: count the number of songs that matches the query.\n" + " queue <query>: prints kara that matches from the queue.\n" "\n" " QUERY:\n" " A query is passed in argument of a COMMAND and is composed of:\n" " - The first word must be the type\n" " - the rest is used for the sqlite regex\n" - " Supported types are: title, [a]ny, source, [auth]or, [lang]uage, type.\n" + " Supported types are: title, [a]ny, source, [auth]or, [lang]uage, type, title\n" "\n" " RANGE:\n" " A range is specified like in python:\n" @@ -756,8 +758,19 @@ search_insert__(struct lkt_cmd_args *args) noreturn void search_plt__(struct lkt_cmd_args *args) { - (void) args; - fail("Not implemented"); + search_with_cmd__(args, "listplaylist"); +} + +noreturn void +search_count__(struct lkt_cmd_args *args) +{ + search_with_cmd__(args, "count"); +} + +noreturn void +search_queue__(struct lkt_cmd_args *args) +{ + search_with_cmd__(args, "playlistinfo"); } /* Parsing stuff. */ @@ -777,6 +790,8 @@ static struct lkt_cmd_opt options_search[] = { { .name = "add", .call = search_add__ }, { .name = "insert", .call = search_insert__ }, { .name = "plt", .call = search_plt__ }, + { .name = "count", .call = search_count__ }, + { .name = "queue", .call = search_queue__ }, LKT_OPT_NULL, };