History

lua: add mp.del_property()

rcombs committed 3 years ago

Commit 51c67841 parent 2cfaa822 files · +15 −0Browse files

Showing the changes to player/lua.c (1 of 2 files). Show all

Unified · Split

player/lua.c+9−0
@@ -613,6 +613,14 @@ static int script_commandv(lua_State *L) · 612 unmodified lines
613613 return check_error(L, mpv_command(ctx->client, args));
614614 }
615615
616+static int script_del_property(lua_State *L)
617+{
618+ struct script_ctx *ctx = get_ctx(L);
619+ const char *p = luaL_checkstring(L, 1);
620+
621+ return check_error(L, mpv_del_property(ctx->client, p));
622+}
623+
616624 static int script_set_property(lua_State *L)
617625 {
618626 struct script_ctx *ctx = get_ctx(L);
@@ -1219,6 +1227,7 @@ static const struct fn_entry main_fns[] = { · 600 unmodified lines
12191227 FN_ENTRY(get_property_bool),
12201228 FN_ENTRY(get_property_number),
12211229 AF_ENTRY(get_property_native),
1230+ FN_ENTRY(del_property),
12221231 FN_ENTRY(set_property),
12231232 FN_ENTRY(set_property_bool),
12241233 FN_ENTRY(set_property_number),

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t