Fixed playlist double-click behaviour.

This commit is contained in:
The Wobbler 2025-01-26 12:33:23 +01:00
parent b106c5eb21
commit 3896d18393
2 changed files with 9 additions and 1 deletions

View file

@ -148,3 +148,11 @@ class Player:
# function that creates a thread which will cache the next track # function that creates a thread which will cache the next track
caching_thread = threading.Thread(target=self.caching_thread_function) caching_thread = threading.Thread(target=self.caching_thread_function)
caching_thread.start() caching_thread.start()
def start_playlist(self, playlist):
self.stop()
self.current_sound, self.current_sound_duration = playlist.set_track(0) # first track
self.current_playlist = playlist
self.start_playing()

View file

@ -35,5 +35,5 @@ class PlaylistTabBar(QTabBar):
playlist_view = self.tab_widget.widget(index) playlist_view = self.tab_widget.widget(index)
playlist = playlist_view.playlist playlist = playlist_view.playlist
self.app.player.current_playlist = playlist self.app.player.start_playlist(playlist)