Added history and improved marking of playing track.

This commit is contained in:
The Wobbler 2025-01-26 13:51:31 +01:00
parent 29f86e2196
commit 74bff6ea13
3 changed files with 48 additions and 14 deletions

View file

@ -116,3 +116,15 @@ class Playlist:
wbz.write(wbz_data)
wbz.close()
def append_track(self, track):
self.tracks.append(track)
if self.view:
self.view.append_track(track)
def h_last_track(self):
# get last track in history (only gets used in player.history)
if len(self.tracks) > 1:
return self.tracks[-2]