From ae797a21ec3ad0f5071911acf99efc56572d4fa3 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 13 Jul 2019 16:10:03 +0200 Subject: command: don't add deprecated CLI aliases to property list A dumb thing that the cursed property-option bridge accidentally did. Normal deprecated options on the other hand are fine in the property list, because they're wanted for compatibility. --- player/command.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'player/command.c') diff --git a/player/command.c b/player/command.c index 8c4f8de5ea..e5d72e5b39 100644 --- a/player/command.c +++ b/player/command.c @@ -6059,6 +6059,18 @@ void command_init(struct MPContext *mpctx) prop.call = co->opt->deprecation_message ? mp_property_deprecated_alias : mp_property_alias; + + // Check whether this eventually arrives at a real option. If not, + // it's some CLI special handling thing. For example, "nosound" is + // mapped to "no-audio", which has CLI special-handling, and cannot + // be set as property. + struct m_config_option *co2 = co; + while (co2 && co2->opt->type == &m_option_type_alias) { + const char *alias = (const char *)co2->opt->priv; + co2 = m_config_get_co_raw(mpctx->mconfig, bstr0(alias)); + } + if (!co2) + continue; } // The option might be covered by a manual property already. -- cgit v1.2.3