From df0d8cda08463b291203812ec475ca185bc8e947 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 27 Mar 2020 00:57:11 +0100 Subject: client API: report IDs of inserted playlist entries on loading playlist May or may not help when dealing with playlist loading in scripts. It's supposed to help with the mean fact that loading a recursive playlist will essentially edit the playlist behind the API user's back. --- player/client.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'player/client.c') diff --git a/player/client.c b/player/client.c index d2a94cc0c9..0babacf147 100644 --- a/player/client.c +++ b/player/client.c @@ -1979,6 +1979,12 @@ int mpv_event_to_node(mpv_node *dst, mpv_event *event) node_map_add_int64(dst, "playlist_entry_id", eef->playlist_entry_id); + if (eef->playlist_insert_id) { + node_map_add_int64(dst, "playlist_insert_id", eef->playlist_insert_id); + node_map_add_int64(dst, "playlist_insert_num_entries", + eef->playlist_insert_num_entries); + } + if (eef->reason == MPV_END_FILE_REASON_ERROR) node_map_add_string(dst, "file_error", mpv_error_string(eef->error)); break; -- cgit v1.2.3