diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c3cf60848c197c9875a988c276c004f4d27d842d..0a44f2a53b1829be0d5a52af8f5dc1d521996e7d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,6 +6,7 @@ - [Style and code](#style-and-code) - [Merge request titles](#merge-request-titles) - [Modules](#modules) +- [Command table](#command-table) --- @@ -132,3 +133,155 @@ is a `void **`, which point to the pointer used to access the module's defined structure. The rest is up to you, no checks will be done. All functions must return an `int` in a POSIX way: `0` if everything is ok, an other value if something went wrong. + +## Command table + +Here is a list of commands used / not used / not implemented in lektord. If the +command differs from what MPD do, it is also specified. + +### MPD command compatibility table + +For the compatibility column, the possible values are the following: + +- `-`: has a poor compatibility, doesn't work as MPD intended it +- `~`: basic compatibility, some arguments types / number may change +- `+`: is compatible +- `CHECK`: check for compatibility status +- `FIXME`: was intended to work as in MPD but is not, fix it +- `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]` | + | | +| `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}` | + | | +| `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}` | + | | +| `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}` | `playlistid {id} | ~ | the uri is only an id | +| `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}]` | `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` | +| `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 + +| Command | Comment / notes | +| ----------------------- | --------------------------------------------------------------- | +| `__import` | import favorites as playlists prefixed bt `@` in lektor | +| `__dump {pltname}` | add the content of the queue to an existing playlist | +| `__adduser {password}` | create a new admin user | +| `__restart` | restarts lektord | +| `__rescan` | same as `rescan`, but force populating without timestamp check | +| `sticker __add {name}` | create a sticker | +| `__insert {uri}` | do the `add` command, but with the maximum priority | +| `__flat` | flat is justice => all prio are now 1 in the queue | + +### Commands with no plan for support + +| MPD command | Reason / notes | +| ----------------------------------------------------------------- | --------------------------------------------- | +| `readcomments {uri}` | really not a priority | +| `readpicture {uri} {offset}` | really not a priority | +| `albumart {uri} {offset}` | really not a priority | +| `mount {path} {uri}` | no necessity in lektord | +| `unmount {path}` | no necessity in lektord | +| `listmounts` | no necessity in lektord | +| `listneighbors` | no necessity in lektord | +| `partition {name}` | no necessity in lektord | +| `listpartitions` | no necessity in lektord | +| `newpartition {name}` | no necessity in lektord | +| `delpartition {name}` | no necessity in lektord | +| `tagtypes` | tags are handled by kurisu for the moment | +| `tagtypes disable {name...}` | tags are handled by kurisu for the moment | +| `tagtypes enable {name...}` | tags are handled by kurisu for the moment | +| `tagtypes clear` | tags are handled by kurisu for the moment | +| `tagtypes all` | tags are handled by kurisu for the moment | +| `addtagid {songid} {tag} {val}` | tags are handled by kurisu for the moment | +| `cleartagid {songid} [tag]` | tags are handled by kurisu for the moment | +| `crossfade {seconds}` | lektord uses libmpv | +| `mixrampdb {dB}` | lektord uses libmpv | +| `mixrampdelay {seconds}` | lektord uses libmpv | +| `moveoutput {outputname}` | lektord uses libmpv | +| `disableoutput {id}` | lektord uses libmpv | +| `enableoutput {id}` | lektord uses libmpv | +| `toggleoutput {id}` | lektord uses libmpv | +| `outputs` | lektord uses libmpv | +| `outputset {id} {name} {value}` | lektord uses libmpv | +| `commands` | not implemented | +| `notcommands` | not implemented | +| `urlhandlers` | not implemented | +| `decoders` | lektord only suprts mkv files (for mkv tags) | +| `subscribe {name}` | no necessity for p2p messages for the moment | +| `unsubscribe {name}` | no necessity for p2p messages for the moment | +| `channels` | no necessity for p2p messages for the moment | +| `readmessages` | no necessity for p2p messages for the moment | +| `sendmessage {channel} {text}` | no necessity for p2p messages for the moment | +| `searchaddpl {name} {filt} [sort {type}] [window {start:end}]` | `playlistadd` exists | +| `playlistmove {name} {from} {to}` | no necessity in lektord as playlists are shuffled when added to the queue | diff --git a/README.md b/README.md index 63124e642a15257ee968e3187545f66a1641f3de..f4cd73a4e179c3f7d1b1f09fe8f04ca03b54627f 100644 --- a/README.md +++ b/README.md @@ -170,151 +170,5 @@ Please, refer to the [CONTRIBUTING](CONTRIBUTING.md) file. Lektor is almost MPD compatible, at least it uses the same protocol, which can be gotten [here](https://www.musicpd.org/doc/html/protocol.html#). The full support for MPD clients (like mpc -and ncmpc) is still WIP. - -### Command compatibility table - -For the compatibility column, the possible values are the following: - -- `-`: has a poor compatibility, doesn't work as MPD intended it -- `~`: basic compatibility, some arguments types / number may change -- `+`: is compatible -- `CHECK`: check for compatibility status -- `FIXME`: was intended to work as in MPD but is not, fix it -- `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]` | + | | -| `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}` | + | | -| `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}` | + | | -| `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}` | `playlistid {id} | ~ | the uri is only an id | -| `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}]` | `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` | -| `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 - -| Command | Comment / notes | -| ----------------------- | --------------------------------------------------------------- | -| `__import` | import favorites as playlists prefixed bt `@` in lektor | -| `__dump {pltname}` | add the content of the queue to an existing playlist | -| `__adduser {password}` | create a new admin user | -| `__restart` | restarts lektord | -| `__rescan` | same as `rescan`, but force populating without timestamp check | -| `sticker __add {name}` | create a sticker | -| `__insert {uri}` | do the `add` command, but with the maximum priority | -| `__flat` | flat is justice => all prio are now 1 in the queue | - -### Commands with no plan for support - -| MPD command | Reason / notes | -| ----------------------------------------------------------------- | --------------------------------------------- | -| `readcomments {uri}` | really not a priority | -| `readpicture {uri} {offset}` | really not a priority | -| `albumart {uri} {offset}` | really not a priority | -| `mount {path} {uri}` | no necessity in lektord | -| `unmount {path}` | no necessity in lektord | -| `listmounts` | no necessity in lektord | -| `listneighbors` | no necessity in lektord | -| `partition {name}` | no necessity in lektord | -| `listpartitions` | no necessity in lektord | -| `newpartition {name}` | no necessity in lektord | -| `delpartition {name}` | no necessity in lektord | -| `tagtypes` | tags are handled by kurisu for the moment | -| `tagtypes disable {name...}` | tags are handled by kurisu for the moment | -| `tagtypes enable {name...}` | tags are handled by kurisu for the moment | -| `tagtypes clear` | tags are handled by kurisu for the moment | -| `tagtypes all` | tags are handled by kurisu for the moment | -| `addtagid {songid} {tag} {val}` | tags are handled by kurisu for the moment | -| `cleartagid {songid} [tag]` | tags are handled by kurisu for the moment | -| `crossfade {seconds}` | lektord uses libmpv | -| `mixrampdb {dB}` | lektord uses libmpv | -| `mixrampdelay {seconds}` | lektord uses libmpv | -| `moveoutput {outputname}` | lektord uses libmpv | -| `disableoutput {id}` | lektord uses libmpv | -| `enableoutput {id}` | lektord uses libmpv | -| `toggleoutput {id}` | lektord uses libmpv | -| `outputs` | lektord uses libmpv | -| `outputset {id} {name} {value}` | lektord uses libmpv | -| `commands` | not implemented | -| `notcommands` | not implemented | -| `urlhandlers` | not implemented | -| `decoders` | lektord only suprts mkv files (for mkv tags) | -| `subscribe {name}` | no necessity for p2p messages for the moment | -| `unsubscribe {name}` | no necessity for p2p messages for the moment | -| `channels` | no necessity for p2p messages for the moment | -| `readmessages` | no necessity for p2p messages for the moment | -| `sendmessage {channel} {text}` | no necessity for p2p messages for the moment | -| `searchaddpl {name} {filt} [sort {type}] [window {start:end}]` | `playlistadd` exists | -| `playlistmove {name} {from} {to}` | no necessity in lektord as playlists are shuffled when added to the queue | +and ncmpc) is still WIP. For the MPD compatibility list, see the +[CONTRIBUTING](CONTRIBUTING.md) file.