summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulian <MyFakeAcc.4@googlemail.com>2015-05-22 21:41:55 +0200
committerwm4 <wm4@nowhere>2017-10-09 20:40:31 +0200
commit0bf4b0d18afc379a27140bd219537eef75edff33 (patch)
tree498f11065bb94ee939286fb66994933efc2da0a4
parentf9fe3b264ecfbd5a947871ef203779159c0e9303 (diff)
downloadmpv-0bf4b0d18afc379a27140bd219537eef75edff33.tar.bz2
mpv-0bf4b0d18afc379a27140bd219537eef75edff33.tar.xz
stats: add debug option
print a warning for properties without value
-rw-r--r--player/lua/stats.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/player/lua/stats.lua b/player/lua/stats.lua
index 696fb0e030..533035e07e 100644
--- a/player/lua/stats.lua
+++ b/player/lua/stats.lua
@@ -16,6 +16,7 @@ require 'mp.options'
local o = {
ass_formatting = true,
duration = 3,
+ debug = false,
-- text style
font = "Source Sans Pro",
@@ -151,6 +152,9 @@ end
function append_property(s, sec, prop, prefix, suffix)
local ret = mp.get_property_osd(prop)
if ret == nil or ret == "" then
+ if o.debug then
+ print("No value for property: " .. prop)
+ end
return false
end
@@ -166,6 +170,9 @@ end
function append_property_inline(s, sec, prop, prefix, suffix, no_prefix_markup, no_prefix_sep, no_indent)
local ret = mp.get_property_osd(prop)
if ret == nil or ret == "" then
+ if o.debug then
+ print("No value for property: " .. prop)
+ end
return false
end