1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-22 23:02:37 +00:00

command: don't display non-sense if volume is unavailable

Showed "Volume: (unavailable)%". That was dumb.

The message string is now a bit convoluted; mostly because the property
expand syntax can't do "if-else", just "if".

CC: @mpv-player/stable
This commit is contained in:
wm4 2014-10-11 21:34:15 +02:00
parent a3bf75279e
commit b9077214cf

View File

@ -3067,7 +3067,7 @@ static const struct property_osd_display {
{ "clock", "Clock" },
// audio
{ "volume", "Volume",
.msg = "Volume: ${volume}% ${?mute==yes:(Muted)}",
.msg = "Volume: ${?volume:${volume}% ${?mute==yes:(Muted)}}${!volume:${volume}}",
.osd_progbar = OSD_VOLUME },
{ "mute", "Mute" },
{ "audio-delay", "A-V delay" },