Fixed a crash where the current_track of a playlist won't get updated when the playlist is loaded from the command line.

This commit is contained in:
The Wobbler 2025-01-26 12:07:18 +01:00
parent 2b1310990a
commit 027c2f6ac8
3 changed files with 9 additions and 2 deletions

View file

@ -15,6 +15,12 @@ class Playlist:
self.current_track: Track | None = None
self.view = None
def clear(self):
self.sorting: list[Qt.SortOrder] | None = None
self.tracks = []
self.current_track_index = 0
self.current_track = None
def load_from_paths(self, paths):
i = 0