From 27cc86d48da091497448cecdd88c5cf3ac729c68 Mon Sep 17 00:00:00 2001 From: Keith Edmunds Date: Sat, 7 Jan 2023 12:21:53 +0000 Subject: [PATCH] Ensure when track stops playing it is no longer highlighted as current track in playlist. --- app/musicmuster.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/musicmuster.py b/app/musicmuster.py index eb06f11..41c805d 100755 --- a/app/musicmuster.py +++ b/app/musicmuster.py @@ -612,15 +612,16 @@ class Window(QMainWindow, Ui_MainWindow): # doesn't see player=None and kick off end-of-track actions self.playing = False - # Repaint playlist to remove currently playing track colour - with Session() as session: - self.current_track.playlist_tab.update_display(session) - # Reset PlaylistTrack objects if self.current_track.track_id: self.previous_track = self.current_track self.current_track = PlaylistTrack() + # Repaint playlist to remove currently playing track colour + # What was current track is now previous track + with Session() as session: + self.previous_track.playlist_tab.update_display(session) + # Reset clocks self.frame_fade.setStyleSheet("") self.frame_silent.setStyleSheet("")