Implemented editing of playlist.
(Changes aren't persistent.)
This commit is contained in:
parent
f0969d013d
commit
cba4fd67fa
5 changed files with 37 additions and 12 deletions
|
@ -34,8 +34,7 @@ class Player:
|
|||
self.app.gui.track_control.on_playstate_update()
|
||||
|
||||
# cache next track so it immediately starts when the current track finishes
|
||||
caching_thread = threading.Thread(target=self.cache_next_track)
|
||||
caching_thread.start()
|
||||
self.cache_next_track()
|
||||
|
||||
def track_finished(self):
|
||||
if not self.current_playlist.on_last_track():
|
||||
|
@ -127,7 +126,7 @@ class Player:
|
|||
self.play()
|
||||
self.track_progress.start()
|
||||
|
||||
def cache_next_track(self):
|
||||
def caching_thread_function(self):
|
||||
# cache the next track
|
||||
# (usually run in separate thread)
|
||||
if self.current_playlist.on_last_track():
|
||||
|
@ -138,3 +137,7 @@ class Player:
|
|||
if not track.cached:
|
||||
track.cache()
|
||||
|
||||
def cache_next_track(self):
|
||||
# function that creates a thread which will cache the next track
|
||||
caching_thread = threading.Thread(target=self.caching_thread_function)
|
||||
caching_thread.start()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue