diff options
-rw-r--r-- | helpers/action.py | 2 | ||||
-rw-r--r-- | helpers/mapping.py | 3 | ||||
-rw-r--r-- | helpers/music_file.py | 3 |
3 files changed, 7 insertions, 1 deletions
diff --git a/helpers/action.py b/helpers/action.py index 247e0a9..eaa419b 100644 --- a/helpers/action.py +++ b/helpers/action.py | |||
@@ -95,6 +95,8 @@ class Action: | |||
95 | if previous is not None: | 95 | if previous is not None: |
96 | previous.stop(fade_out=fade_out) | 96 | previous.stop(fade_out=fade_out) |
97 | previous = music | 97 | previous = music |
98 | else: | ||
99 | music.stop(fade_out=fade_out) | ||
98 | 100 | ||
99 | if previous is not None: | 101 | if previous is not None: |
100 | previous.stop(fade_out=fade_out, wait=wait) | 102 | previous.stop(fade_out=fade_out, wait=wait) |
diff --git a/helpers/mapping.py b/helpers/mapping.py index 3622f9d..43cacf2 100644 --- a/helpers/mapping.py +++ b/helpers/mapping.py | |||
@@ -39,6 +39,9 @@ class Mapping(RelativeLayout): | |||
39 | self.master_volume) | 39 | self.master_volume) |
40 | 40 | ||
41 | for music in self.open_files.values(): | 41 | for music in self.open_files.values(): |
42 | if not (music.is_loaded_playing() or music.is_loaded_paused()): | ||
43 | continue | ||
44 | |||
42 | if fade > 0: | 45 | if fade > 0: |
43 | music.gain_effects.append(GainEffect( | 46 | music.gain_effects.append(GainEffect( |
44 | "fade", | 47 | "fade", |
diff --git a/helpers/music_file.py b/helpers/music_file.py index aef0adc..b26a1be 100644 --- a/helpers/music_file.py +++ b/helpers/music_file.py | |||
@@ -70,7 +70,8 @@ class MusicFile(Machine): | |||
70 | ] | 70 | ] |
71 | 71 | ||
72 | Machine.__init__(self, states=states, | 72 | Machine.__init__(self, states=states, |
73 | transitions=transitions, initial='initial') | 73 | transitions=transitions, initial='initial', |
74 | ignore_invalid_triggers=True) | ||
74 | 75 | ||
75 | self.volume = 100 | 76 | self.volume = 100 |
76 | self.mapping = mapping | 77 | self.mapping = mapping |