Unset preview button if there's no track to preview

This commit is contained in:
Keith Edmunds 2023-06-12 17:54:58 +01:00
parent 52a4de0c01
commit df265ead69

View File

@ -1295,6 +1295,7 @@ class Window(QMainWindow, Ui_MainWindow):
# Otherwise get path to next track to play
track_path = self.next_track.path
if not track_path:
self.btnPreview.setChecked(False)
return
mixer.music.load(track_path)
mixer.music.play()