Got it working, but it's not better than before...

This commit is contained in:
The Wobbler 2025-02-04 14:43:08 +01:00
parent 6134c21ce4
commit 22ffd211df
7 changed files with 48 additions and 18 deletions

View file

@ -43,13 +43,9 @@ class Library:
playlist = Playlist(self.app, file_name.replace("_", " ").split(".")[0])
self.playlists.append(playlist)
playlist.load_from_m3u(path)
if playlist.title == "Temporary Playlist":
self.temporary_playlist = playlist
self.load_playlist_views()
def load_playlist_views(self):
for library_dock in self.library_docks:
playlist_tabs: QTabWidget = library_dock.library_widget.playlist_tabs
@ -57,7 +53,7 @@ class Library:
playlist_tabs.playlists = {}
for playlist in self.playlists:
playlist_view = PlaylistView(playlist)
playlist_view = PlaylistView(playlist, library_dock)
playlist_tabs.addTab(playlist_view, playlist.title)
def on_exit(self, event):
@ -74,6 +70,6 @@ class Library:
for library_dock in self.library_docks:
playlist_tabs: QTabWidget = library_dock.library_widget.playlist_tabs
playlist_view = PlaylistView(playlist)
playlist_view = PlaylistView(playlist, library_dock)
playlist_tabs.addTab(playlist_view, playlist.title)