From b9077214cf63f6103deed12c3047388f5dbb3fc4 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 11 Oct 2014 21:34:15 +0200 Subject: [PATCH] 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 --- player/command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/player/command.c b/player/command.c index da2e7de125..6daa0555c7 100644 --- a/player/command.c +++ b/player/command.c @@ -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" },