Added a check to loading_thread() that makes sure that the playlist isn't already loaded. (And probably fixed some bugs without knowing it.)
This commit is contained in:
parent
bae644c304
commit
66ee7d5af6
1 changed files with 3 additions and 1 deletions
|
@ -78,6 +78,9 @@ class Playlist:
|
||||||
loading_thread.start()
|
loading_thread.start()
|
||||||
|
|
||||||
def loading_thread(self):
|
def loading_thread(self):
|
||||||
|
if self.loaded:
|
||||||
|
return
|
||||||
|
|
||||||
if self.load_from is None: # if the playlist is in the library
|
if self.load_from is None: # if the playlist is in the library
|
||||||
self.load_from_wbz(self.path)
|
self.load_from_wbz(self.path)
|
||||||
|
|
||||||
|
@ -313,4 +316,3 @@ class Playlist:
|
||||||
|
|
||||||
if len(self.tracks) > 1:
|
if len(self.tracks) > 1:
|
||||||
return self.tracks[-2]
|
return self.tracks[-2]
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue