From 5dc91f6605489b3b7e4464627aeaecd63747baad Mon Sep 17 00:00:00 2001 From: The Wobbler Date: Thu, 20 Feb 2025 17:17:26 +0100 Subject: [PATCH] Implemented that the player stops playing when the deleted playlist is the currently playing. --- wobuzz/player/playlist.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wobuzz/player/playlist.py b/wobuzz/player/playlist.py index 110adad..4f548ea 100644 --- a/wobuzz/player/playlist.py +++ b/wobuzz/player/playlist.py @@ -176,6 +176,10 @@ class Playlist: self.app.utils.unique_names.remove(self.title) 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): for dock_id in self.views: view = self.views[dock_id]