From 66ee7d5af621e857a6ac523028390e3389cca41d Mon Sep 17 00:00:00 2001 From: The Wobbler Date: Thu, 27 Feb 2025 18:41:35 +0100 Subject: [PATCH] Added a check to loading_thread() that makes sure that the playlist isn't already loaded. (And probably fixed some bugs without knowing it.) --- wobuzz/player/playlist.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wobuzz/player/playlist.py b/wobuzz/player/playlist.py index d1d56bd..c2ca4c7 100644 --- a/wobuzz/player/playlist.py +++ b/wobuzz/player/playlist.py @@ -78,6 +78,9 @@ class Playlist: loading_thread.start() def loading_thread(self): + if self.loaded: + return + if self.load_from is None: # if the playlist is in the library self.load_from_wbz(self.path) @@ -313,4 +316,3 @@ class Playlist: if len(self.tracks) > 1: return self.tracks[-2] -