mirror of
https://github.com/mpv-player/mpv
synced 2025-01-13 10:26:09 +00:00
manpage: clarify profile-cond requires underscores
While this says that _ is replaced with -, it doesn't say that you HAVE to use _. This isn't obvious and I didn't understand why my profile conditions with - weren't working at first. Seeing as the person who reproted #8324 ran into this as well, this may be worth clarifying.
This commit is contained in:
parent
a9aa5a1b1c
commit
d479dfd67d
@ -781,9 +781,11 @@ ignored. This Lua code execution is not sandboxed.
|
||||
|
||||
Any variables in condition expressions can reference properties. If an
|
||||
identifier is not already defined by Lua or mpv, it is interpreted as property.
|
||||
For example, ``pause`` would return the current pause status. If the variable
|
||||
name contains any ``_`` characters, they are turned into ``-``. For example,
|
||||
``playback_time`` would return the property ``playback-time``.
|
||||
For example, ``pause`` would return the current pause status. You cannot
|
||||
reference properties with ``-`` this way since that would denote a subtraction,
|
||||
but if the variable name contains any ``_`` characters, they are turned into
|
||||
``-``. For example, ``playback_time`` would return the property
|
||||
``playback-time``.
|
||||
|
||||
A more robust way to access properties is using ``p.property_name`` or
|
||||
``get("property-name", default_value)``. The automatic variable to property
|
||||
|
Loading…
Reference in New Issue
Block a user