From 007c728ad27cc9eb3d0315d6d15fd3bc5f055cc5 Mon Sep 17 00:00:00 2001 From: "Avi Halachmi (:avih)" Date: Wed, 18 Aug 2021 20:38:35 +0300 Subject: command: cycle: respect the prefix "repeatable" The "cycle" command _declaration_ enables repeatability by default, however, the command handler applies additional logic to augment it, based on the property which is being cycled - using some guesswork. Specifically, properties with discrete values are not repeatable (like sub or osd-level), while continuous properties are repeatable (like volume). Previously, the "repeatable" prefix could not override this additional logic. This commit changes the behavior so that the logic affects only the default repeatability (still based on the property like before), however, the "repeatable" prefix is now allowed to override it. --- player/command.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'player') diff --git a/player/command.c b/player/command.c index 04d5e076ae..f2fb031819 100644 --- a/player/command.c +++ b/player/command.c @@ -4921,7 +4921,9 @@ static void cmd_add_cycle(void *p) bool is_cycle = !!cmd->priv; char *property = cmd->args[0].v.s; - if (cmd->cmd->repeated && !check_property_autorepeat(property, mpctx)) { + if (cmd->cmd->repeated && !check_property_autorepeat(property, mpctx) && + !(cmd->cmd->flags & MP_ALLOW_REPEAT) /* "repeatable" prefix */ ) + { MP_VERBOSE(mpctx, "Dropping command '%s' from auto-repeated key.\n", cmd->cmd->original); return; -- cgit v1.2.3