Skip to content

Commit

Permalink
Merge pull request #377 from gudvinr/feature/376_fix-osc
Browse files Browse the repository at this point in the history
switch to "user-data" property for storing values
  • Loading branch information
iwalton3 authored May 13, 2024
2 parents 34aa71e + 8a9894e commit a071c01
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions jellyfin_mpv_shim/trickplay-osc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

--
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit a071c01

Please sign in to comment.