Ensure when track stops playing it is no longer highlighted as current

track in playlist.
This commit is contained in:
Keith Edmunds 2023-01-07 12:21:53 +00:00
parent 7584ad2090
commit 27cc86d48d

View File

@ -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("")