diff --git a/wobuzz/player/playlist.py b/wobuzz/player/playlist.py index 0734dcf..790d86b 100644 --- a/wobuzz/player/playlist.py +++ b/wobuzz/player/playlist.py @@ -295,6 +295,10 @@ class Playlist: f"{self.app.settings.library_path}/playlists/{self.title.replace(" ", "_")}.wbz.m3u" ) + # make sure the playlist is not referenced anymore as the temporary playlist + if self == self.app.library.temporary_playlist: + self.app.library.temporary_playlist = None + if not old_title == self.title: # remove only when the playlist actually has a different name self.app.utils.unique_names.remove(old_title) @@ -312,6 +316,7 @@ class Playlist: for track in self.tracks: # remove items that corresponded to the track and this playlist track.delete_items(self) + # make sure the playlist is not referenced as the temporary playlist if self == self.app.library.temporary_playlist: self.app.library.temporary_playlist = None