TOOLS/lua/observe-all: explicitly observe all options

This commit is contained in:
wm4 2016-09-23 20:49:23 +02:00
parent f4db6b8479
commit b9153ee177
1 changed files with 9 additions and 1 deletions

View File

@ -6,9 +6,17 @@
local utils = require("mp.utils")
for i,name in ipairs(mp.get_property_native("property-list")) do
function observe(name)
mp.observe_property(name, "native", function(name, val)
print("property '" .. name .. "' changed to '" ..
utils.to_string(val) .. "'")
end)
end
for i,name in ipairs(mp.get_property_native("property-list")) do
observe(name)
end
for i,name in ipairs(mp.get_property_native("options")) do
observe("options/" .. name)
end