aboutsummaryrefslogtreecommitdiff
path: root/music_sampler/actions/stop.py
diff options
context:
space:
mode:
Diffstat (limited to 'music_sampler/actions/stop.py')
-rw-r--r--music_sampler/actions/stop.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/music_sampler/actions/stop.py b/music_sampler/actions/stop.py
index 88cc66d..769c312 100644
--- a/music_sampler/actions/stop.py
+++ b/music_sampler/actions/stop.py
@@ -19,22 +19,25 @@ def run(action, music=None, fade_out=0, wait=False,
19def description(action, music=None, fade_out=0, wait=False, 19def description(action, music=None, fade_out=0, wait=False,
20 set_wait_id=None, **kwargs): 20 set_wait_id=None, **kwargs):
21 21
22 formats = []
22 message = "stopping " 23 message = "stopping "
23 if music is not None: 24 if music is not None:
24 message += "music « {} »".format(music.name) 25 message += "music « {} »"
26 formats.append(music.name)
25 else: 27 else:
26 message += "all musics" 28 message += "all musics"
27 29
28 if fade_out > 0: 30 if fade_out > 0:
29 message += " with {}s fadeout".format(fade_out) 31 message += " with {}s fadeout"
32 formats.append(fade_out)
30 if wait: 33 if wait:
31 if set_wait_id is not None: 34 if set_wait_id is not None:
32 message += " (waiting the end of fadeout, with id {})"\ 35 message += " (waiting the end of fadeout, with id {})"
33 .format(set_wait_id) 36 formats.append(set_wait_id)
34 else: 37 else:
35 message += " (waiting the end of fadeout)" 38 message += " (waiting the end of fadeout)"
36 39
37 return message 40 return _(message).format(*formats)
38 41
39def interrupt(action, music=None, fade_out=0, wait=False, 42def interrupt(action, music=None, fade_out=0, wait=False,
40 set_wait_id=None, **kwargs): 43 set_wait_id=None, **kwargs):