aboutsummaryrefslogtreecommitdiffhomepage
path: root/player
diff options
context:
space:
mode:
authorGravatar Julian <MyFakeAcc.4@googlemail.com>2018-03-24 22:43:04 +0100
committerGravatar Jan Ekström <jeebjp@gmail.com>2018-03-25 02:07:26 +0200
commit9975835bdeec3f2b04b136ef40c70b02487bb0e6 (patch)
tree258e9d084b9d792af0478fa3efa69334ae48e1d7 /player
parent9aa0638f0f316586efeb6c6c861313aa129a7045 (diff)
stats: print section titles independently
Previously, section titles (File/Video/Audio) were printed as suffix of a property that was assumed to always exist. However, with e.g. lavi-complex this is not the case, therfore, print them without being dependent on a property.
Diffstat (limited to 'player')
-rw-r--r--player/lua/stats.lua9
1 files changed, 6 insertions, 3 deletions
diff --git a/player/lua/stats.lua b/player/lua/stats.lua
index d266a5f1b5..ad9cca2224 100644
--- a/player/lua/stats.lua
+++ b/player/lua/stats.lua
@@ -424,7 +424,8 @@ end
local function add_file(s)
- append_property(s, "filename", {prefix="File:", nl="", indent=""})
+ append(s, "", {prefix=o.nl .. o.nl .. "File:", nl="", indent=""})
+ append_property(s, "filename", {prefix_sep="", nl="", indent=""})
if not (mp.get_property_osd("filename") == mp.get_property_osd("media-title")) then
append_property(s, "media-title", {prefix="Title:"})
end
@@ -471,7 +472,8 @@ local function add_video(s)
return
end
- if append_property(s, "video-codec", {prefix=o.nl .. o.nl .. "Video:", nl="", indent=""}) then
+ append(s, "", {prefix=o.nl .. o.nl .. "Video:", nl="", indent=""})
+ if append_property(s, "video-codec", {prefix_sep="", nl="", indent=""}) then
append_property(s, "hwdec-current", {prefix="(hwdec:", nl="", indent=" ",
no_prefix_markup=true, suffix=")"}, {no=true, [""]=true})
end
@@ -533,7 +535,8 @@ local function add_audio(s)
return
end
- append_property(s, "audio-codec", {prefix=o.nl .. o.nl .. "Audio:", nl="", indent=""})
+ append(s, "", {prefix=o.nl .. o.nl .. "Audio:", nl="", indent=""})
+ append_property(s, "audio-codec", {prefix_sep="", nl="", indent=""})
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"})