summaryrefslogtreecommitdiffstats
path: root/TOOLS
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-09-23 20:49:23 +0200
committerwm4 <wm4@nowhere>2016-09-23 20:49:23 +0200
commitb9153ee177387efeedd1d5294b07a49e928d2ebd (patch)
tree3e9c3bf4d97144e21f4a950ec1fdfece1d407ebb /TOOLS
parentf4db6b8479e52476f3ee35d9f6153e251b498462 (diff)
downloadmpv-b9153ee177387efeedd1d5294b07a49e928d2ebd.tar.bz2
mpv-b9153ee177387efeedd1d5294b07a49e928d2ebd.tar.xz
TOOLS/lua/observe-all: explicitly observe all options
Diffstat (limited to 'TOOLS')
-rw-r--r--TOOLS/lua/observe-all.lua10
1 files changed, 9 insertions, 1 deletions
diff --git a/TOOLS/lua/observe-all.lua b/TOOLS/lua/observe-all.lua
index be9f7270e4..0037439d5b 100644
--- a/TOOLS/lua/observe-all.lua
+++ b/TOOLS/lua/observe-all.lua
@@ -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