Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working on mpv v0.37.0 and after #9

Open
Ashkanten opened this issue Aug 6, 2024 · 2 comments
Open

Not working on mpv v0.37.0 and after #9

Ashkanten opened this issue Aug 6, 2024 · 2 comments

Comments

@Ashkanten
Copy link

Not working. Some API changes broke OSC scripts so they need to be updated due to newer versions of mpv (v0.37.0 and after).
please fix this. i really like your script. many thanks

@lasersPew
Copy link

Are you on Windows? If yes' this issue is dupe of #8

@Ashkanten
Copy link
Author

Are you on Windows? If yes' this issue is dupe of #8

Issue is Fixed thanks to:
0dist/oscc#6 (comment)

Find:

utils.shared_script_property_set("osc-margins",
string.format("%f,%f,%f,%f", margins.l, margins.r, margins.t, margins.b))
Replace it with:

if mp.del_property then
mp.set_property_native("user-data/osc/margins", margins)
else
utils.shared_script_property_set("osc-margins",
string.format("%f,%f,%f,%f", margins.l, margins.r, margins.t, margins.b))
end
Then find:

utils.shared_script_property_set("osc-margins", nil)
Replace it with:

if mp.del_property then
mp.del_property("user-data/osc/margins")
else
utils.shared_script_property_set("osc-margins", nil)
end
This will ensure compatibility for older and current mpv versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants