summaryrefslogtreecommitdiffstats
path: root/input
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-01-24 03:20:15 +0100
committerKevin Mitchell <kevmitch@gmail.com>2018-01-25 20:18:32 -0800
commit0d359879c9edfaefe8f4d500802781e32f2c8d9a (patch)
treeb412fe69f8e0723ef11be2b9018e2e43768312f0 /input
parent9e64b9382265fb688fecda15b28ad6c41b587cd6 (diff)
downloadmpv-0d359879c9edfaefe8f4d500802781e32f2c8d9a.tar.bz2
mpv-0d359879c9edfaefe8f4d500802781e32f2c8d9a.tar.xz
command: add a change-list command
Requested. See manpage additions. The main reason why this goes through the trouble to keep the action/operation parameter separate is so that we don't expose some option parser implementation details to the command (although that is a relatively weak reason), and also to make it more different from the "set" command, which can't support this type of option as it goes through the property layer. Fixes #5435.
Diffstat (limited to 'input')
-rw-r--r--input/cmd_list.c1
-rw-r--r--input/cmd_list.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/input/cmd_list.c b/input/cmd_list.c
index dc3dd68a61..58c7601c84 100644
--- a/input/cmd_list.c
+++ b/input/cmd_list.c
@@ -150,6 +150,7 @@ const struct mp_cmd_def mp_cmds[] = {
{ MP_CMD_RUN, "run", { ARG_STRING, ARG_STRING }, .vararg = true },
{ MP_CMD_SET, "set", { ARG_STRING, ARG_STRING } },
+ { MP_CMD_CHANGE_LIST, "change-list", { ARG_STRING, ARG_STRING, ARG_STRING } },
{ MP_CMD_ADD, "add", { ARG_STRING, OARG_DOUBLE(1) },
.allow_auto_repeat = true,
.scalable = true,
diff --git a/input/cmd_list.h b/input/cmd_list.h
index 4d03626bee..af46fe3931 100644
--- a/input/cmd_list.h
+++ b/input/cmd_list.h
@@ -65,6 +65,7 @@ enum mp_command_type {
MP_CMD_SUB_REMOVE,
MP_CMD_SUB_RELOAD,
MP_CMD_SET,
+ MP_CMD_CHANGE_LIST,
MP_CMD_PRINT_TEXT,
MP_CMD_SHOW_TEXT,
MP_CMD_EXPAND_TEXT,