diff --git a/README.md b/README.md index 26b32091ff724d3e727084f98e7eb0b5fcceb13d..d4030e5ffc41b015bc4b9f342c928c3e1fdf2cf4 100644 --- a/README.md +++ b/README.md @@ -184,83 +184,83 @@ For the compatibility column, the possible values are the following: - `TODO`: marked as 'to be implemented', check the next releases if it is implemented - nothing: has not been implemented and is not a priority -| MPD command | lektord command | compatibility | compatibility note | -| ----------------------------------------- | ----------------------------- | :-----------: | ----------------------------------------------- | -| `clearerror` | | | not implemented | -| `currentsong` | `currentsong` | ~ | use the lektord tags, not MPD once | -| `idle [subsistem]` | `idle [subsistem]` | + | | +| MPD command | lektord command | compatibility | compatibility note | +| ----------------------------------------- | ----------------------------- | :-----------: | ------------------------------------------------- | +| `clearerror` | | | not implemented | +| `currentsong` | `currentsong` | ~ | use the lektord tags, not MPD once | +| `idle [subsistem]` | `idle [subsistem]` | + | | | `status` | `status` | ~ | slight differencies in the duration and time, not working with mpc | -| `stats` | `stats` | ~ | don't send all the stats, only `db_update` | -| `consume {state}` | `consume {state}` | + | | -| `random {state}` | `random {state}` | + | | -| `repeat {state}` | `repeat {state}` | + | | +| `stats` | `stats` | ~ | don't send all the stats, only `db_update` | +| `consume {state}` | `consume {state}` | + | | +| `random {state}` | `random {state}` | + | | +| `repeat {state}` | `repeat {state}` | + | | | `setvol {vol}` | `setvol {vol}` | + | won't display the correct volume, mpv properties flush issue... | | `getvol` | `getvol` | + | will display the correct value after the end of the kara | -| `single {state}` | `single {state}` | + | | -| `replay_gain_mode {mode}` | | | not implemented | -| `replay_gain_status` | | | not implemented | -| `next` | `next` | + | | -| `pause {state}` | `pause {state}` | CHECK | check compat state | -| `play [songpos]` | `play [songpos]` | + | if no `songpos` passed, defaults to `0` | -| `playid [songid]` | `playid {songid}` | + | get the first found `songid` in the queue | -| `previous` | `previous` | + | | -| `seek {songpos} {time}` | `seek {songpos} {time}` | + | | -| `seekid {songid} {time}` | `seekid {songid} {time}` | + | seek to the first found id, sqlite dependent | -| `seekcur {time}` | `seekcur {time}` | + | | -| `stop` | `stop` | + | | -| `add {uri}` | `add {uri}` | + | | -| `addid {id} [pos]` | `addid {id...}` | ~ | can add multiple songs, but no position support | -| `clear` | `clear` | + | | -| `delete [{pos}/{start:end}]` | `delete {pos}` | - | can take only one position | +| `single {state}` | `single {state}` | + | | +| `replay_gain_mode {mode}` | | | not implemented | +| `replay_gain_status` | | | not implemented | +| `next` | `next` | + | | +| `pause {state}` | `pause {state}` | CHECK | check compat state | +| `play [songpos]` | `play [songpos]` | + | if no `songpos` passed, defaults to `0` | +| `playid [songid]` | `playid {songid}` | + | get the first found `songid` in the queue | +| `previous` | `previous` | + | | +| `seek {songpos} {time}` | `seek {songpos} {time}` | + | | +| `seekid {songid} {time}` | `seekid {songid} {time}` | + | seek to the first found id, sqlite dependent | +| `seekcur {time}` | `seekcur {time}` | + | | +| `stop` | `stop` | + | | +| `add {uri}` | `add {uri}` | + | | +| `addid {id} [pos]` | `addid {id...}` | ~ | can add multiple songs, but no position support | +| `clear` | `clear` | + | | +| `delete [{pos}/{start:end}]` | `delete {pos}` | - | can take only one position | | `deleteid {songid}` | `deleteid {songid}` | + | delete all kara with that id, skip the current kara if needed | -| `move [{from}/{start:end}] {to}` | | TODO | not implemented | -| `moveid {from} {to}` | `moveid {from} {to}` | ~ | `to` is always an absolute position | -| `playlist` | `playlist` | + | | -| `playlistfind {tag} {needle}` | `playlistfind {uri}` | ~ | uses lektord URIs | -| `playlistid {songid}` | | TODO | not implemented | -| `playlistinfo [[songpos]/[start:end]]` | `playlistinfo` | - | is an alias to `playlist` | -| `playlistsearch {taf} {needle}` | `playlistsearch {uri}` | ~ | uses lektord URIs | -| `plchanges {version} [start:end]` | | | not implemented | -| `plchangesposid {version} [start:end]` | | | not implemented | -| `prio {prio} {start:end}` | | | not implemented | -| `prioid {prio} {id...}` | | | not implemented | -| `rangeid {id} {start:end}` | | | not implemented | -| `shuffle [start:end]` | `shuffle` | ~ | shuffles all the queue | -| `swap {song1} {song2}` | `swap {song1} {song2}` | + | | -| `swap {songid1} {songid2}` | | | not implemented | -| `listplaylist {name}` | `listplaylist {name}` | + | | -| `listplaylistinfo {name}` | `listplaylistinfo {name} {uri}` | - | do a search in the playlist | -| `listplaylists` | `listplaylists` | + | | -| `load {name} [start:end]` | | | not implemented, use `add {uri}` to do that | -| `playlistadd {name} {uri}` | `playlistadd {name} {uri}` | ~ | uses lektord URIs | -| `playlistclear {name}` | `playlistclear {name}` | + | | +| `move [{from}/{start:end}] {to}` | | TODO | not implemented | +| `moveid {from} {to}` | `moveid {from} {to}` | ~ | `to` is always an absolute position | +| `playlist` | `playlist` | + | | +| `playlistfind {tag} {needle}` | `playlistfind {uri}` | ~ | uses lektord URIs | +| `playlistid {songid}` | | TODO | not implemented | +| `playlistinfo [[songpos]/[start:end]]` | `playlistinfo` | - | is an alias to `playlist` | +| `playlistsearch {taf} {needle}` | `playlistsearch {uri}` | ~ | uses lektord URIs | +| `plchanges {version} [start:end]` | | | not implemented | +| `plchangesposid {version} [start:end]` | | | not implemented | +| `prio {prio} {start:end}` | | | not implemented | +| `prioid {prio} {id...}` | | | not implemented | +| `rangeid {id} {start:end}` | | | not implemented | +| `shuffle [start:end]` | `shuffle` | ~ | shuffles all the queue | +| `swap {song1} {song2}` | `swap {song1} {song2}` | + | | +| `swap {songid1} {songid2}` | | | not implemented | +| `listplaylist {name}` | `listplaylist {name}` | + | | +| `listplaylistinfo {name}` | `listplaylistinfo {name} {uri}` | - | do a search in the playlist | +| `listplaylists` | `listplaylists` | + | | +| `load {name} [start:end]` | | | not implemented, use `add {uri}` to do that | +| `playlistadd {name} {uri}` | `playlistadd {name} {uri}` | ~ | uses lektord URIs | +| `playlistclear {name}` | `playlistclear {name}` | + | | | `playlistdelete {name} {songpos}` | `playlistdelete {name} [songid]` | ~ | delete all the playlist if `songpos` is not spesified, uses kara ids, not pos | -| `rename {name} {newname}` | `rename {name} {newname}` | ~ | will fail if the `newplaylist` already exists | -| `rm {name}` | `rm {name}` | + | | -| `save {name}` | `save {name} {destdb}` | - | export a part of the db into as sqlite3 db | -| `count {filt} [group {grptype}]` | | | not implemted | -| `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 | -| `listall [uri]` | | | not implemented | -| `listallinfo [uri]` | | | not implemented | -| `listfiles {uri}` | | | not implemented | -| `lsinfo [uri]` | | | not implemented | -| `search {filt} [sort {type}] [window {start:end}]` | `search {uri}` | - | is an alias to `find` | -| `searchadd {filt} [sort {type}] [window {start:end}]` | `searchadd {uri}` | - | is an alias to `findadd` | -| `update [uri]` | `update` | ~ | doesn't take URIs | -| `rescan [uri]` | `rescan` | ~ | doesn't take URIs | -| `close` | `close` | + | send the `OK` status before closing the socket | -| `kill` | `kill` | + | | -| `password {password}` | `password {password}` | + | | -| `ping` | `ping` | + | | -| `config` | `config` | + | all authentified client can do this command | -| `sticker get {t} {uri} {n}` | `sticker get {type} {uri} {name}` | CHECK | check the return conventions | -| `sticker set {t} {uri} {n} {val}` | `sticker set {t} {uri} {n} {val}` | CHECK | check the return conventions | -| `sticker delete {t} {uri} [n]` | `sticker delete {t} {uri} [n]` | CHECK | check the return conventions | -| `sticker list {type} {uri}` | `sticker list {type} {uri}` | CHECK | check the return conventions | -| `sticker find {t} {uri} {n}` | `sticker find {t} {uri} {n}` | CHECK | check the return conventions | +| `rename {name} {newname}` | `rename {name} {newname}` | ~ | will fail if the `newplaylist` already exists | +| `rm {name}` | `rm {name}` | + | | +| `save {name}` | `save {name} {destdb}` | - | export a part of the db into as sqlite3 db | +| `count {filt} [group {grptype}]` | | | not implemted | +| `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 | +| `listall [uri]` | `listall {uri}` | - | alias to `find` | +| `listallinfo [uri]` | `listallinfo {uri}` | - | alias to `find` | +| `listfiles {uri}` | `listfiles {uri}` | - | alias to `find` | +| `lsinfo [uri]` | `lsinfo {uri}` | - | alias to `find` | +| `search {filt} [sort {type}] [window {start:end}]` | `search {uri}` | - | is an alias to `find` | +| `searchadd {filt} [sort {type}] [window {start:end}]` | `searchadd {uri}` | - | is an alias to `findadd` | +| `update [uri]` | `update` | ~ | doesn't take URIs | +| `rescan [uri]` | `rescan` | ~ | doesn't take URIs | +| `close` | `close` | + | send the `OK` status before closing the socket | +| `kill` | `kill` | + | | +| `password {password}` | `password {password}` | + | | +| `ping` | `ping` | + | | +| `config` | `config` | + | all authentified client can do this command | +| `sticker get {t} {uri} {n}` | `sticker get {type} {uri} {name}` | CHECK | check the return conventions | +| `sticker set {t} {uri} {n} {val}` | `sticker set {t} {uri} {n} {val}` | CHECK | check the return conventions | +| `sticker delete {t} {uri} [n]` | `sticker delete {t} {uri} [n]` | CHECK | check the return conventions | +| `sticker list {type} {uri}` | `sticker list {type} {uri}` | CHECK | check the return conventions | +| `sticker find {t} {uri} {n}` | `sticker find {t} {uri} {n}` | CHECK | check the return conventions | | `sticker find {t} {uri} {n} {op} {v}` | `sticker find {t} {uri} {n} {op} {v}` | CHECK | check the return conventions, operators are `g`, `e` and `l` | ### Commands specific to lektord diff --git a/src/net/listen.c b/src/net/listen.c index 883ad67f51debb3b85c29d1d46acb581337ad672..ef5f286417aa4e7095149cdc8e8dd54151330d4e 100644 --- a/src/net/listen.c +++ b/src/net/listen.c @@ -290,7 +290,12 @@ handle_simple_command(struct lkt_state *srv, size_t c, struct lkt_command cmd) else if (STR_MATCH(cmd.name, "idle")) { err = ! command_idle(srv, c, &cmd); goto end_no_send_status; - } else if (STR_MATCH(cmd.name, "search") || STR_MATCH(cmd.name, "find")) + } else if (STR_MATCH(cmd.name, "search") || + STR_MATCH(cmd.name, "find") || + STR_MATCH(cmd.name, "listall") || + STR_MATCH(cmd.name, "listallinfo") || + STR_MATCH(cmd.name, "listfiles") || + STR_MATCH(cmd.name, "lsinfo") ) err = ! command_find(srv, c, cmd.args, cmd.cont, database_search_database_init); else err = 2;