diff --git a/app/musicmuster.py b/app/musicmuster.py index 4b9a5ae..86b94ab 100755 --- a/app/musicmuster.py +++ b/app/musicmuster.py @@ -1591,16 +1591,18 @@ class Window(QMainWindow, Ui_MainWindow): # Update intro counter if applicable and, if updated, return # because playing an intro takes precedence over timing a # preview. - remaining_ms = track_sequence.current.time_remaining_intro() - if remaining_ms > 0: - self.label_intro_timer.setText(f"{remaining_ms / 1000:.1f}") - if remaining_ms <= Config.INTRO_SECONDS_WARNING_MS: + intro_ms_remaining = track_sequence.current.time_remaining_intro() + if intro_ms_remaining > 0: + self.label_intro_timer.setText(f"{intro_ms_remaining / 1000:.1f}") + if intro_ms_remaining <= Config.INTRO_SECONDS_WARNING_MS: self.label_intro_timer.setStyleSheet( f"background: {Config.COLOUR_WARNING_TIMER}" ) return else: - self.label_intro_timer.setStyleSheet("") + if self.label_intro_timer.styleSheet() != "": + self.label_intro_timer.setStyleSheet("") + self.label_intro_timer.setText("0.0") except AttributeError: # currnent track ended during servicing tick pass