X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FProjets%2FPython%2FMusicSampler.git;a=blobdiff_plain;f=helpers%2Factions%2Fstop_all_actions.py;h=4ea875a7ca3d6aa9c7d17c43cbdce0a32ee94ffa;hp=f3fc5fbe58937f9ca95368e3fdaf241858e65c2a;hb=62a8b07a2264101fd6d9c201267966e3c5de0cd4;hpb=6c42e32d98aa2e04d446f31b8e667a280acf4b54 diff --git a/helpers/actions/stop_all_actions.py b/helpers/actions/stop_all_actions.py index f3fc5fb..4ea875a 100644 --- a/helpers/actions/stop_all_actions.py +++ b/helpers/actions/stop_all_actions.py @@ -1,5 +1,14 @@ -def run(action, **kwargs): - action.mapping.stop_all_running() +def run(action, key_start_time=0, other_only=False, **kwargs): + if other_only: + action.mapping.stop_all_running( + except_key=action.key, + key_start_time=key_start_time) + else: + action.mapping.stop_all_running() -def description(action, **kwargs): - return "stopping all actions" +def description(action, other_only=False, **kwargs): + message = "stopping all actions" + if other_only: + message += " except this key" + + return message