"The shared-script-properties property is deprecated and will be removed in the future. Use the user-data property instead."
The message in the title is what pops up at the very first line of mpv when playing any file or stream and it is due to a change in mpv 0.37. Unfortunately, I do not have the knowledge to fix it, but some other (forks of) osc scripts have already done it, e.g.
https://github.com/zydezu/ModernX/commit/8819a61618048b89bb1fc20b39458f371ea6e62a
The ModernX fork you linked drops compatibility for mpv <0.37. Use the solution from thumbfast instead: https://github.com/po5/thumbfast/commit/fb9d37e76b97a3a541004556ec19c0620ca308a3
Do you expect me to find all those instances on a file that is not the same as the one mentioned in the commit? I can not do that, sorry. As for the compatibility, I respect what you say, but I think it would be better for the script to be ready for mpv 0.38 (assuming the forementioned "property" will be completely removed in 0.38) and have 2 versions, one for the 0.36 and older and one for 0.37 and newer. After all, everyone will probably upgrade to mpv 0.37+ in a few years.
lol for taking this personally
I just noticed that the last commit mentions it does not support mpv 0.37 or newer. I am leaving this open though, in case the dev fixes it in the future. If not, feel free to close it. I will keep using it though and ignore the warning, until any newer version of mpv has issues with it.
I am leaving this open though, in case the dev fixes it in the future. If not, feel free to close it.
The fix is really simple as @po5 explained. Here is a step by step:
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.
@0dist
Thank you
@Samillion
Thank you for the fix. I promise to try it once I fix mpv 0.39 which gives me a segfault when it runs.