mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
command: add write_watch_later_config command
Closes #808. Signed-off-by: wm4 <wm4@nowhere>
This commit is contained in:
@@ -1240,6 +1240,9 @@ Property list
|
||||
changed at runtime by writing to this property. Note that many options
|
||||
require reloading the file for changes to take effect. If there is an
|
||||
equivalent property, prefer setting the property instead.
|
||||
|
||||
``write_watch_later_config``
|
||||
Saves current playback position.
|
||||
|
||||
Property Expansion
|
||||
------------------
|
||||
|
||||
@@ -177,6 +177,8 @@ const struct mp_cmd_def mp_cmds[] = {
|
||||
ARG_INT, ARG_INT }},
|
||||
{ MP_CMD_OVERLAY_REMOVE, "overlay_remove", { ARG_INT } },
|
||||
|
||||
{ MP_CMD_WRITE_WATCH_LATER_CONFIG, "write_watch_later_config", },
|
||||
|
||||
{0}
|
||||
};
|
||||
|
||||
|
||||
@@ -106,6 +106,8 @@ enum mp_command_type {
|
||||
MP_CMD_OVERLAY_ADD,
|
||||
MP_CMD_OVERLAY_REMOVE,
|
||||
|
||||
MP_CMD_WRITE_WATCH_LATER_CONFIG,
|
||||
|
||||
// Internal
|
||||
MP_CMD_COMMAND_LIST, // list of sub-commands in args[0].v.p
|
||||
};
|
||||
|
||||
@@ -3702,6 +3702,11 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd)
|
||||
case MP_CMD_IGNORE:
|
||||
break;
|
||||
|
||||
case MP_CMD_WRITE_WATCH_LATER_CONFIG: {
|
||||
mp_write_watch_later_conf(mpctx);
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
MP_VERBOSE(mpctx, "Received unknown cmd %s\n", cmd->name);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user