From 7b57b034713a5af5b4b96bc04e7f737da4890894 Mon Sep 17 00:00:00 2001
From: Kubat <mael.martin31@gmail.com>
Date: Sat, 30 Jan 2021 22:22:02 +0100
Subject: [PATCH] MPD: Alias the 'list' command to 'find'

---
 README.md        | 2 +-
 src/net/listen.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index d4030e5f..4b0fa999 100644
--- a/README.md
+++ b/README.md
@@ -242,7 +242,7 @@ For the compatibility column, the possible values are the following:
 | `getfingerprint {uri}`                    |                                       |       | not implemted                                     |
 | `find {filt} [sort {type}] [window {START:END}]`      | `find {uri}`              | -     | do a simple search in the db with lektord's URIs  |
 | `findadd {filt} [sort {type}] [window {start:end}]`   | `findadd {uri}`           | -     | same remarks as `find`                            |
-| `list {type} {filt} [group {grptype}]`    |                                       |       | not implemented                                   |
+| `list {type} {filt} [group {grptype}]`    | `list {uri}`                          | -     | alias to `find`                                   |
 | `listall [uri]`                           | `listall {uri}`                       | -     | alias to `find`                                   |
 | `listallinfo [uri]`                       | `listallinfo {uri}`                   | -     | alias to `find`                                   |
 | `listfiles {uri}`                         | `listfiles {uri}`                     | -     | alias to `find`                                   |
diff --git a/src/net/listen.c b/src/net/listen.c
index ef5f2864..2f3fcbf1 100644
--- a/src/net/listen.c
+++ b/src/net/listen.c
@@ -292,6 +292,7 @@ handle_simple_command(struct lkt_state *srv, size_t c, struct lkt_command cmd)
             goto end_no_send_status;
         } else if (STR_MATCH(cmd.name, "search")        ||
                    STR_MATCH(cmd.name, "find")          ||
+                   STR_MATCH(cmd.name, "list")          ||
                    STR_MATCH(cmd.name, "listall")       ||
                    STR_MATCH(cmd.name, "listallinfo")   ||
                    STR_MATCH(cmd.name, "listfiles")     ||
-- 
GitLab