From 844efa54313b395750d139abcea9425e9f4ee6f9 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 19 Feb 2014 16:16:42 +0100 Subject: command: move metadata entry access to metadata/by-key/ The old way still works, and is fine to use. Still discourage it, because it might conflict with other ways to access this property, such as the one added in the next commit. --- player/command.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'player') 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) { -- cgit v1.2.3