diff --git a/src/main/lkt.c b/src/main/lkt.c index 702bc27433ca35f1fb6327ec8dd599e4a167235b..cc38dbe34161e22117bfcf6ab9139c0b6ce841e7 100644 --- a/src/main/lkt.c +++ b/src/main/lkt.c @@ -45,20 +45,27 @@ help(void) "\n" " COMMANDS:\n" " help display this help message.\n" - " play <?idx> toggle play/pause state of lektor, may start at a certain index.\n" + " play [?idx] toggle play/pause state of lektor, may start at a certain index.\n" " stop stop the playback but not the window if it exists.\n" " status get the status of lektor.\n" " current get the currently playing song.\n" - " add <query> add a kara to the playlist with a query.\n" - " delete <id> delete the id from the queue.\n" - " clear clear the queue of lektor.\n" " prev play previous kara in the queue.\n" " next play the next kara in the queue.\n" " shuffle shuffle lektor's playlist and play it from the begening.\n" - " queue <?arg> prints the queue. The argument is either a range or a count from the current kara.\n" + " queue tge queue sub command.\n" " plt the playlist sub command.\n" " search the search sub command.\n" "\n" + " QUEUE COMMANDS:\n" + " pos <arg> the qrgument can be a position or a range.\n" + " <count> prints the next songs in the queue.\n" + " pop [pos] pop a song in the queue.\n" + " add <query> add a kara to the queue with a query.\n" + " seek <query> seek the next song that matchs the query.\n" + " delete <id> delete the song by its id in the queue.\n" + " clear clear the queue.\n" + " crop crop the queue.\n" + "\n" " PLAYLIST COMMANDS:\n" " help display this help message.\n" " create <plt> creates a playlist after the argument.\n" @@ -574,7 +581,7 @@ check: } noreturn void -add__(struct lkt_cmd_args *args) +queue_add__(struct lkt_cmd_args *args) { char buff[LKT_MESSAGE_MAX]; int i; @@ -640,10 +647,7 @@ queue_pos__(struct lkt_cmd_args *args) { char buff[LKT_MESSAGE_MAX], *endptr; - if (args->argc == 0) - args->argv = LKT_QUEUE_DEFAULT; - - else if (args->argc > 1) + if (args->argc != 1) fail("Invalid argument for the pos command"); long continuation = 0, up = 0; @@ -882,6 +886,7 @@ search_queue__(struct lkt_cmd_args *args) static struct lkt_cmd_opt options_queue[] = { { .name = "pos", .call = queue_pos__ }, { .name = "pop", .call = queue_pop__ }, + { .name = "add", .call = queue_add__ }, { .name = "seek", .call = queue_seek__ }, { .name = "delete", .call = queue_delete__ }, { .name = "clear", .call = queue_clear__ }, @@ -943,7 +948,6 @@ static struct lkt_cmd_opt options_[] = { { .name = "next", .call = next__ }, { .name = "previous", .call = prev__ }, { .name = "queue", .call = queue__ }, - { .name = "add", .call = add__ }, { .name = "shuffle", .call = shuffle__ }, { .name = "status", .call = status__ }, { .name = "stop", .call = stop__ },