From 489f61aa4c21a94e664632919577c91abdba89be Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 10 Feb 2012 19:03:24 +0100 Subject: commands: add pt_clear command to clear playlist This deletes all playlist elements, except the currently active playlist entry. NOTE: this doesn't remove parent nodes in the case when we really have a play tree (as opposed to a play list). Apparently this doesn't cause any harm. --- input/input.c | 1 + input/input.h | 1 + 2 files changed, 2 insertions(+) (limited to 'input') diff --git a/input/input.c b/input/input.c index a880a583d8..c6d5470bb5 100644 --- a/input/input.c +++ b/input/input.c @@ -184,6 +184,7 @@ static const mp_cmd_t mp_cmds[] = { { MP_CMD_SWITCH_VSYNC, "switch_vsync", 0, { {MP_CMD_ARG_INT} } }, { MP_CMD_LOADFILE, "loadfile", 1, { {MP_CMD_ARG_STRING}, {MP_CMD_ARG_INT} } }, { MP_CMD_LOADLIST, "loadlist", 1, { {MP_CMD_ARG_STRING}, {MP_CMD_ARG_INT} } }, + { MP_CMD_PLAY_TREE_CLEAR, "pt_clear", 0 }, { MP_CMD_RUN, "run", 1, { {MP_CMD_ARG_STRING} } }, { MP_CMD_CAPTURING, "capturing", 0 }, { MP_CMD_VF_CHANGE_RECTANGLE, "change_rectangle", 2, { {MP_CMD_ARG_INT}, {MP_CMD_ARG_INT} } }, diff --git a/input/input.h b/input/input.h index 99a69c7355..084e2dd3e7 100644 --- a/input/input.h +++ b/input/input.h @@ -50,6 +50,7 @@ enum mp_command_type { MP_CMD_MUTE, MP_CMD_LOADFILE, MP_CMD_LOADLIST, + MP_CMD_PLAY_TREE_CLEAR, MP_CMD_VF_CHANGE_RECTANGLE, MP_CMD_GAMMA, MP_CMD_SUB_VISIBILITY, -- cgit v1.2.3