diff options
author | wm4 <wm4@nowhere> | 2014-02-19 16:16:42 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-02-19 16:16:42 +0100 |
commit | 844efa54313b395750d139abcea9425e9f4ee6f9 (patch) | |
tree | ea89e27e6fa1f6a61b979793abeee1b35edccf1e /player/command.c | |
parent | 15fa1202229b149cc52448535f7fcd0e7f6aba08 (diff) | |
download | mpv-844efa54313b395750d139abcea9425e9f4ee6f9.tar.bz2 mpv-844efa54313b395750d139abcea9425e9f4ee6f9.tar.xz |
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.
Diffstat (limited to 'player/command.c')
-rw-r--r-- | player/command.c | 5 |
1 files changed, 4 insertions, 1 deletions
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) { |