summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--DOCS/man/en/input.rst10
-rw-r--r--player/command.c5
2 files changed, 12 insertions, 3 deletions
diff --git a/DOCS/man/en/input.rst b/DOCS/man/en/input.rst
index c23685848d..4077d22e83 100644
--- a/DOCS/man/en/input.rst
+++ b/DOCS/man/en/input.rst
@@ -649,8 +649,14 @@ an option at runtime.
key and value strings separated by ``,``. (If a key or value contains ``,``,
you're screwed.)
-``metadata/<key>``
- Value of metadata entry ``<key>``.
+ This has a number of sub-properties:
+
+ ``metadata/by-key/<key>``
+ Value of metadata entry ``<key>``.
+
+ ``metadata/<key>``
+ Old version of ``metadata/by-key/<key>``. Use is discouraged, because
+ the metadata key string could conflict with other sub-properties.
``chapter-metadata``
Metadata of current chapter. Works similar to ``metadata`` property. This
diff --git a/player/command.c b/player/command.c
index 83fcef4a61..d9a2b99922 100644
--- a/player/command.c
+++ b/player/command.c
@@ -801,7 +801,10 @@ static int tag_property(m_option_t *prop, int action, void *arg,
}
case M_PROPERTY_KEY_ACTION: {
struct m_property_action_arg *ka = arg;
- char *meta = mp_tags_get_str(tags, ka->key);
+ bstr key = bstr0(ka->key);
+ // Direct access without this prefix is allowed for compatibility.
+ bstr_eatstart0(&key, "by-key/");
+ char *meta = mp_tags_get_bstr(tags, key);
if (!meta)
return M_PROPERTY_UNKNOWN;
switch (ka->action) {