From c4e97fc5632f59dd0d9af5bd95f0eeb2cbfe42f3 Mon Sep 17 00:00:00 2001 From: ChuckBuilds <33324927+ChuckBuilds@users.noreply.github.com> Date: Sun, 25 May 2025 14:57:11 -0500 Subject: [PATCH] adjust type errors in music manager --- config/config.json | 2 +- src/music_manager.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/config.json b/config/config.json index 49cdf99e..46ef7032 100644 --- a/config/config.json +++ b/config/config.json @@ -223,7 +223,7 @@ "font_path": "assets/fonts/press-start-2p.ttf", "font_size": 8, "scroll": true, - "scroll_speed": 10, + "scroll_speed": 25, "text_color": [255, 0, 0], "background_color": [0, 0, 0] }, diff --git a/src/music_manager.py b/src/music_manager.py index 3b8de67e..a6dcf1e3 100644 --- a/src/music_manager.py +++ b/src/music_manager.py @@ -129,7 +129,7 @@ class MusicManager: logger.info("Music display activated.") self.is_music_display_active = True if self.ytm and self.preferred_source in ["auto", "ytm"]: - if not self.ytm.is_connected(): + if not self.ytm.is_connected: logger.info("Attempting to connect YTM client due to music display activation.") # Pass a reasonable timeout for on-demand connection if self.ytm.connect_client(timeout=10): @@ -142,7 +142,7 @@ class MusicManager: def deactivate_music_display(self): logger.info("Music display deactivated.") self.is_music_display_active = False - if self.ytm and self.ytm.is_connected(): + if self.ytm and self.ytm.is_connected: logger.info("Disconnecting YTM client due to music display deactivation.") self.ytm.disconnect_client() @@ -291,7 +291,7 @@ class MusicManager: if should_poll_ytm_now: # Re-check availability just before polling - if self.ytm and self.ytm.is_connected(): # Check if connected instead of is_available() + if self.ytm and self.ytm.is_connected: try: ytm_track = self.ytm.get_current_track() # Ensure ytm_track is not None before trying to access its player info