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.
This commit is contained in:
wm4 2019-07-13 16:10:03 +02:00
parent 2f5dbaa832
commit ae797a21ec
1 changed files with 12 additions and 0 deletions

View File

@ -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.