load playlist in separate thread to prevent blocking on startup

This commit is contained in:
2025-04-22 16:24:00 -04:00
parent 5d2de1471f
commit b9bdf31944
2 changed files with 17 additions and 6 deletions

View File

@ -57,6 +57,7 @@ class RadioUtil:
"electronic",
]
self.active_playlist: list[dict] = []
self.playlist_loaded: bool = False
self.now_playing: dict = {
"artist": "N/A",
"song": "N/A",
@ -378,6 +379,7 @@ class RadioUtil:
"%s items remain for playback after filtering",
len(self.active_playlist),
)
self.playlist_loaded = True
except Exception as e:
logging.info("Playlist load failed: %s", str(e))
traceback.print_exc()