summaryrefslogtreecommitdiffstats
path: root/player/lua.c
diff options
context:
space:
mode:
authorrcombs <rcombs@rcombs.me>2022-12-16 15:22:33 -0600
committerrcombs <rcombs@rcombs.me>2023-01-28 14:20:20 -0600
commit51c6784df7e3972858e95aefdadad4a423fe76ab (patch)
treefb36b7ee0b4f97df9c27dc470e66c83afc4fbfe5 /player/lua.c
parent2cfaa820e54b12de437bb4da97d894ad610abcdd (diff)
downloadmpv-51c6784df7e3972858e95aefdadad4a423fe76ab.tar.bz2
mpv-51c6784df7e3972858e95aefdadad4a423fe76ab.tar.xz
lua: add mp.del_property()
Diffstat (limited to 'player/lua.c')
-rw-r--r--player/lua.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/player/lua.c b/player/lua.c
index b3a7167dce..9b53b76465 100644
--- a/player/lua.c
+++ b/player/lua.c
@@ -613,6 +613,14 @@ static int script_commandv(lua_State *L)
return check_error(L, mpv_command(ctx->client, args));
}
+static int script_del_property(lua_State *L)
+{
+ struct script_ctx *ctx = get_ctx(L);
+ const char *p = luaL_checkstring(L, 1);
+
+ return check_error(L, mpv_del_property(ctx->client, p));
+}
+
static int script_set_property(lua_State *L)
{
struct script_ctx *ctx = get_ctx(L);
@@ -1219,6 +1227,7 @@ static const struct fn_entry main_fns[] = {
FN_ENTRY(get_property_bool),
FN_ENTRY(get_property_number),
AF_ENTRY(get_property_native),
+ FN_ENTRY(del_property),
FN_ENTRY(set_property),
FN_ENTRY(set_property_bool),
FN_ENTRY(set_property_number),