Added player.stop() call in the close_event, so the player definitely stops, even when a playlist is still loading / saving.
This commit is contained in:
parent
8d74c1e14c
commit
012447ca47
2 changed files with 2 additions and 5 deletions
|
@ -55,6 +55,7 @@ class GUI:
|
|||
self.settings.update_all()
|
||||
|
||||
def on_exit(self, event):
|
||||
self.app.player.stop()
|
||||
self.app.library.on_exit(event)
|
||||
|
||||
self.app.settings.window_size = (self.window.width(), self.window.height())
|
||||
|
|
|
@ -42,17 +42,13 @@ class TrackControl(QToolBar):
|
|||
def connect(self):
|
||||
self.previous_button.triggered.connect(self.previous_track)
|
||||
self.toggle_play_button.triggered.connect(self.toggle_playing)
|
||||
self.stop_button.triggered.connect(self.stop)
|
||||
self.stop_button.triggered.connect(self.app.player.stop)
|
||||
self.next_button.triggered.connect(self.next_track)
|
||||
|
||||
def previous_track(self):
|
||||
if self.app.player.current_playlist is not None and self.app.player.current_playlist.has_tracks():
|
||||
self.app.player.previous_track()
|
||||
|
||||
def stop(self):
|
||||
if self.app.player.current_playlist is not None and self.app.player.current_playlist.has_tracks():
|
||||
self.app.player.stop()
|
||||
|
||||
def next_track(self):
|
||||
if self.app.player.current_playlist is not None and self.app.player.current_playlist.has_tracks():
|
||||
self.app.player.next_track()
|
||||
|
|
Loading…
Add table
Reference in a new issue