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

deprecate shared-script-properties #12498

Merged
merged 2 commits into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions DOCS/interface-changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ Interface changes
- rename `--cdrom-device` to `--cdda-device`
- remove `--scale-cutoff`, `--cscale-cutoff`, `--dscale-cutoff`, `--tscale-cutoff`
- remove `--scaler-lut-size`
- deprecate shared-script-properties (user-data is a replacement)
--- mpv 0.36.0 ---
- add `--target-contrast`
- Target luminance value is now also applied when ICC profile is used.
Expand Down
2 changes: 2 additions & 0 deletions player/command.c
Original file line number Diff line number Diff line change
Expand Up @@ -3617,6 +3617,8 @@ static int mp_property_script_props(void *ctx, struct m_property *prop,
{
MPContext *mpctx = ctx;
struct command_ctx *cmd = mpctx->command_ctx;
MP_WARN(mpctx, "The shared-script-properties property is deprecated and will "
"be removed in the future. Use the user-data property instead.\n");
switch (action) {
case M_PROPERTY_GET_TYPE:
*(struct m_option *)arg = script_props_type;
Expand Down
5 changes: 0 additions & 5 deletions player/lua/osc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2206,14 +2206,11 @@ 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_native("user-data/osc/margins", margins)
end

function shutdown()
reset_margins()
utils.shared_script_property_set("osc-margins", nil)
mp.del_property("user-data/osc")
end

Expand Down Expand Up @@ -2870,7 +2867,6 @@ function visibility_mode(mode, no_osd)
end

user_opts.visibility = mode
utils.shared_script_property_set("osc-visibility", mode)
mp.set_property_native("user-data/osc/visibility", mode)

if not no_osd and tonumber(mp.get_property("osd-level")) >= 1 then
Expand Down Expand Up @@ -2903,7 +2899,6 @@ function idlescreen_visibility(mode, no_osd)
user_opts.idlescreen = false
end

utils.shared_script_property_set("osc-idlescreen", mode)
mp.set_property_native("user-data/osc/idlescreen", user_opts.idlescreen)

if not no_osd and tonumber(mp.get_property("osd-level")) >= 1 then
Expand Down