diff options
author | wm4 <wm4@nowhere> | 2020-03-27 00:57:11 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2020-03-27 00:57:11 +0100 |
commit | df0d8cda08463b291203812ec475ca185bc8e947 (patch) | |
tree | bd10780993e10b5fbc089f1b9bb2019a830d4a3f /player/client.c | |
parent | d3be6a61634ff6f9ba217320eaa9fb9349a5c144 (diff) | |
download | mpv-df0d8cda08463b291203812ec475ca185bc8e947.tar.bz2 mpv-df0d8cda08463b291203812ec475ca185bc8e947.tar.xz |
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.
Diffstat (limited to 'player/client.c')
-rw-r--r-- | player/client.c | 6 |
1 files changed, 6 insertions, 0 deletions
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; |