summaryrefslogtreecommitdiffstats
path: root/player/lua
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-09-21 11:35:14 -0500
committerDudemanguy <random342@airmail.cc>2023-11-22 16:29:43 +0000
commit86b498ecc0e6276bb905df57f479d0506b45ba53 (patch)
tree399cea9a9207eea5e8298f072768550ec1356c13 /player/lua
parent5220725ca506bc40f1f0c3f0507fa337605f1dba (diff)
downloadmpv-86b498ecc0e6276bb905df57f479d0506b45ba53.tar.bz2
mpv-86b498ecc0e6276bb905df57f479d0506b45ba53.tar.xz
player: remove shared-script-properties property
This property was never encouraged. The manual even stated that "You should avoid using it, unless you absolutely have to." Since we now have user-data which is superior in every single way and replaces this, delete this property. The manual also has threatened people for years with the line "It's a makeshift solution which could go away any time (for example, when a better solution becomes available)." We were nice and deprecated it in 1d00aee8e191c9689a20e67e3d6dfd2af6ad2588 for a while to give script authors some time to update. Let's remove it for good now.
Diffstat (limited to 'player/lua')
-rw-r--r--player/lua/defaults.lua24
1 files changed, 0 insertions, 24 deletions
diff --git a/player/lua/defaults.lua b/player/lua/defaults.lua
index 233d1d63f4..baa3a2461e 100644
--- a/player/lua/defaults.lua
+++ b/player/lua/defaults.lua
@@ -809,28 +809,4 @@ function mp_utils.subprocess_detached(t)
mp.commandv("run", unpack(t.args))
end
-function mp_utils.shared_script_property_set(name, value)
- if value ~= nil then
- -- no such thing as change-list with mpv_node, so build a string value
- mp.commandv("change-list", "shared-script-properties", "append",
- name .. "=" .. value)
- else
- mp.commandv("change-list", "shared-script-properties", "remove", name)
- end
-end
-
-function mp_utils.shared_script_property_get(name)
- local map = mp.get_property_native("shared-script-properties")
- return map and map[name]
-end
-
--- cb(name, value) on change and on init
-function mp_utils.shared_script_property_observe(name, cb)
- -- it's _very_ wasteful to observe the mpv core "super" property for every
- -- shared sub-property, but then again you shouldn't use this
- mp.observe_property("shared-script-properties", "native", function(_, val)
- cb(name, val and val[name])
- end)
-end
-
return {}