summaryrefslogtreecommitdiffstats
path: root/DOCS
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-03-21 17:45:30 +0100
committerwm4 <wm4@nowhere>2020-03-21 19:33:03 +0100
commit7e885a3bc3af4df93681b6e760a34e59e2f47ef7 (patch)
treec2687c6b364a2e5aeef0c466fb04988bafc35ab3 /DOCS
parent956a5d9ac61ffe4034abcc81405e8ecdacac8b36 (diff)
downloadmpv-7e885a3bc3af4df93681b6e760a34e59e2f47ef7.tar.bz2
mpv-7e885a3bc3af4df93681b6e760a34e59e2f47ef7.tar.xz
client API: add a playlist entry unique ID
This should make dealing with some async. things easier. It's intentionally not a globally unique ID.
Diffstat (limited to 'DOCS')
-rw-r--r--DOCS/client-api-changes.rst1
-rw-r--r--DOCS/man/input.rst7
2 files changed, 8 insertions, 0 deletions
diff --git a/DOCS/client-api-changes.rst b/DOCS/client-api-changes.rst
index b1a61fe865..9a224c9f5b 100644
--- a/DOCS/client-api-changes.rst
+++ b/DOCS/client-api-changes.rst
@@ -34,6 +34,7 @@ API changes
--- mpv 0.33.0 ---
1.108 - Deprecate MPV_EVENT_IDLE
+ - add mpv_event_start_file, mpv_event_end_file.playlist_entry_id
1.107 - Remove the deprecated qthelper.hpp. This was obviously not part of the
libmpv API, only an "additionally" provided helper, thus this is not
considered an API change. If you are maintaining a project that relies
diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst
index e58bd2c507..60e024ebc9 100644
--- a/DOCS/man/input.rst
+++ b/DOCS/man/input.rst
@@ -2351,6 +2351,12 @@ Property list
such fields, and only if mpv's parser supports it for the given
playlist format.
+ ``playlist/N/id``
+ Unique ID for this entry. This is an automatically assigned integer ID
+ that is unique for the entire life time of the current mpv core
+ instance. Other commands, events, etc. use this as ``playlist_entry_id``
+ fields.
+
When querying the property with the client API using ``MPV_FORMAT_NODE``,
or with Lua ``mp.get_property_native``, this will return a mpv_node with
the following contents:
@@ -2363,6 +2369,7 @@ Property list
"current" MPV_FORMAT_FLAG (might be missing; since mpv 0.7.0)
"playing" MPV_FORMAT_FLAG (same)
"title" MPV_FORMAT_STRING (optional)
+ "id" MPV_FORMAT_INT64
``track-list``
List of audio/video/sub tracks, current entry marked. Currently, the raw