summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulian <MyFakeAcc.4@googlemail.com>2019-01-13 13:34:15 +0100
committersfan5 <sfan5@live.de>2019-01-16 16:59:00 +0100
commit73fe0611b32bbdbbd687046d5f3785da3ddefb27 (patch)
tree03b8e77a503ba403177c95a339ede9121752742d
parent9be68e49b26036972860dc10df2363e6e8f0d586 (diff)
downloadmpv-master.tar.bz2
mpv-master.tar.xz
stats: merge multiple properties into one lineHEADmaster
Merge file-size/file-format and audio channel-count/format into one line respectively. This fixes stats overflowing the screen in larger than 19:6 aspect ratios. In this case a problem was reported for ~21:9 which should be common enough for us to "support" it.
-rw-r--r--player/lua/stats.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/player/lua/stats.lua b/player/lua/stats.lua
index 95a036d5c4..504e54636e 100644
--- a/player/lua/stats.lua
+++ b/player/lua/stats.lua
@@ -430,7 +430,8 @@ local function add_file(s)
append_property(s, "media-title", {prefix="Title:"})
end
- append_property(s, "file-format", {prefix="Format/Protocol:"})
+ local fs = append_property(s, "file-size", {prefix="Size:"})
+ append_property(s, "file-format", {prefix="Format/Protocol:", nl=fs and "" or o.nl})
local ch_index = mp.get_property_number("chapter")
if ch_index and ch_index >= 0 then
@@ -460,7 +461,6 @@ local function add_file(s)
indent=o.prefix_sep, no_prefix_markup=true})
end
end
- append_property(s, "file-size", {prefix="Size:"})
end
@@ -539,9 +539,9 @@ local function add_audio(s)
append(s, "", {prefix=o.nl .. o.nl .. "Audio:", nl="", indent=""})
append_property(s, "audio-codec", {prefix_sep="", nl="", indent=""})
- append(s, r["format"], {prefix="Format:"})
+ local cc = append(s, r["channel-count"], {prefix="Channels:"})
+ append(s, r["format"], {prefix="Format:", nl=cc and "" or o.nl})
append(s, r["samplerate"], {prefix="Sample Rate:", suffix=" Hz"})
- append(s, r["channel-count"], {prefix="Channels:"})
append_property(s, "packet-audio-bitrate", {prefix="Bitrate:", suffix=" kbps"})
append_filters(s, "af", "Filters:")
end