From 0bf4b0d18afc379a27140bd219537eef75edff33 Mon Sep 17 00:00:00 2001 From: Julian Date: Fri, 22 May 2015 21:41:55 +0200 Subject: stats: add debug option print a warning for properties without value --- player/lua/stats.lua | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'player') 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 -- cgit v1.2.3