Implemented that the player stops playing when the deleted playlist is the currently playing.

This commit is contained in:
The Wobbler 2025-02-20 17:17:26 +01:00
parent 730e070dfc
commit 5dc91f6605

View file

@ -176,6 +176,10 @@ class Playlist:
self.app.utils.unique_names.remove(self.title) self.app.utils.unique_names.remove(self.title)
self.app.library.playlists.remove(self) self.app.library.playlists.remove(self)
if self.app.player.current_playlist == self: # stop if this is the current playlist
self.app.player.stop()
self.app.player.current_playlist = None
def append_track(self, track): def append_track(self, track):
for dock_id in self.views: for dock_id in self.views:
view = self.views[dock_id] view = self.views[dock_id]