Connected PlaylistView.itemDoubleClicked to a function that then tells the player to play that track.

This commit is contained in:
The Wobbler 2024-12-29 14:31:21 +01:00
parent 8fbb40d2f9
commit da27963884
5 changed files with 34 additions and 6 deletions

View file

@ -52,6 +52,15 @@ class Player:
self.track_progress.start()
self.app.gui_communication.on_track_start()
def play_track_in_playlist(self, track_index):
self.stop()
self.current_sound, self.current_sound_duration = self.current_playlist.set_track(track_index)
self.play()
self.track_progress.start()
self.app.gui_communication.on_track_start()
def pause(self):
self.music_channel.pause()
self.track_progress.pause()