From 8a9894e4763e451442944e23727e045a6ab2ed80 Mon Sep 17 00:00:00 2001 From: gudvinr Date: Fri, 19 Apr 2024 14:02:48 +0300 Subject: [PATCH] switch to "user-data" property for storing values mpv-player/mpv@86b498e removed deprecated utils.shared_script_property_set. Since deprecation was ignored for years, it eventually broke jellyfin-mpv-shim. Fixes #376 --- jellyfin_mpv_shim/trickplay-osc.lua | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/jellyfin_mpv_shim/trickplay-osc.lua b/jellyfin_mpv_shim/trickplay-osc.lua index d755b86d12..eea4c86506 100644 --- a/jellyfin_mpv_shim/trickplay-osc.lua +++ b/jellyfin_mpv_shim/trickplay-osc.lua @@ -2237,13 +2237,12 @@ function update_margins() reset_margins() end - utils.shared_script_property_set("osc-margins", - string.format("%f,%f,%f,%f", margins.l, margins.r, margins.t, margins.b)) + mp.set_property("user-data/osc-margins", string.format("%f,%f,%f,%f", margins.l, margins.r, margins.t, margins.b)) end function shutdown() reset_margins() - utils.shared_script_property_set("osc-margins", nil) + mp.set_property("user-data/osc-margins", nil) end -- @@ -2907,7 +2906,7 @@ function visibility_mode(mode, no_osd) end user_opts.visibility = mode - utils.shared_script_property_set("osc-visibility", mode) + mp.set_property("user-data/osc-visibility", mode) if not no_osd and tonumber(mp.get_property("osd-level")) >= 1 then mp.osd_message("OSC visibility: " .. mode) @@ -2939,7 +2938,7 @@ function idlescreen_visibility(mode, no_osd) user_opts.idlescreen = false end - utils.shared_script_property_set("osc-idlescreen", mode) + mp.set_property("user-data/osc-idlescreen", mode) if not no_osd and tonumber(mp.get_property("osd-level")) >= 1 then mp.osd_message("OSC logo visibility: " .. tostring(mode))