summaryrefslogtreecommitdiffstats
path: root/player/client.c
diff options
context:
space:
mode:
Diffstat (limited to 'player/client.c')
-rw-r--r--player/client.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/player/client.c b/player/client.c
index 396c623cea..648ff1173c 100644
--- a/player/client.c
+++ b/player/client.c
@@ -1923,6 +1923,9 @@ int mpv_event_to_node(mpv_node *dst, mpv_event *event)
if (event->error < 0)
node_map_add_string(dst, "error", mpv_error_string(event->error));
+ if (event->reply_userdata)
+ node_map_add_int64(dst, "id", event->reply_userdata);
+
switch (event->event_id) {
case MPV_EVENT_START_FILE: {
@@ -1999,6 +2002,13 @@ int mpv_event_to_node(mpv_node *dst, mpv_event *event)
break;
}
+ case MPV_EVENT_COMMAND_REPLY: {
+ mpv_event_command *cmd = event->data;
+
+ *node_map_add(dst, "result", MPV_FORMAT_NONE) = cmd->result;
+ break;
+ }
+
case MPV_EVENT_HOOK: {
mpv_event_hook *hook = event->data;