1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-26 17:12:36 +00:00

observe-all.lua: fix some lint warnings

This commit is contained in:
Kacper Michajłow 2024-05-12 02:13:06 +02:00
parent 16c19445bc
commit 50c4b2cd4c

View File

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