mirror of https://github.com/mpv-player/mpv
command: remove property change notification from property dispatcher
Properties should handle this themselves. This basically sent redundant notifications. I found only two places where the "proper" notification was missing.
This commit is contained in:
parent
464a045ed8
commit
0e376150a6
|
@ -486,6 +486,7 @@ static int mp_property_stream_open_filename(void *ctx, struct m_property *prop,
|
||||||
return M_PROPERTY_ERROR;
|
return M_PROPERTY_ERROR;
|
||||||
mpctx->stream_open_filename =
|
mpctx->stream_open_filename =
|
||||||
talloc_strdup(mpctx->stream_open_filename, *(char **)arg);
|
talloc_strdup(mpctx->stream_open_filename, *(char **)arg);
|
||||||
|
mp_notify_property(mpctx, prop->name);
|
||||||
return M_PROPERTY_OK;
|
return M_PROPERTY_OK;
|
||||||
}
|
}
|
||||||
case M_PROPERTY_GET_TYPE:
|
case M_PROPERTY_GET_TYPE:
|
||||||
|
@ -997,6 +998,7 @@ static int parse_node_chapters(struct MPContext *mpctx,
|
||||||
}
|
}
|
||||||
|
|
||||||
mp_notify(mpctx, MPV_EVENT_CHAPTER_CHANGE, NULL);
|
mp_notify(mpctx, MPV_EVENT_CHAPTER_CHANGE, NULL);
|
||||||
|
mp_notify_property(mpctx, "chapter-list");
|
||||||
|
|
||||||
return M_PROPERTY_OK;
|
return M_PROPERTY_OK;
|
||||||
}
|
}
|
||||||
|
@ -3534,9 +3536,6 @@ int mp_property_do(const char *name, int action, void *val,
|
||||||
struct command_ctx *cmd = ctx->command_ctx;
|
struct command_ctx *cmd = ctx->command_ctx;
|
||||||
int r = m_property_do(ctx->log, cmd->properties, name, action, val, ctx);
|
int r = m_property_do(ctx->log, cmd->properties, name, action, val, ctx);
|
||||||
|
|
||||||
if (r == M_PROPERTY_OK && is_property_set(action, val))
|
|
||||||
mp_notify_property(ctx, (char *)name);
|
|
||||||
|
|
||||||
if (mp_msg_test(ctx->log, MSGL_V) && is_property_set(action, val)) {
|
if (mp_msg_test(ctx->log, MSGL_V) && is_property_set(action, val)) {
|
||||||
struct m_option ot = {0};
|
struct m_option ot = {0};
|
||||||
void *data = val;
|
void *data = val;
|
||||||
|
|
Loading…
Reference in New Issue