mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-11 21:33:00 +00:00
more ytm tuning, reduce debug logging, remove callback preventing display from rotating
This commit is contained in:
@@ -397,9 +397,7 @@ class DisplayController:
|
|||||||
logger.debug("DisplayController received music update (via callback): Track is None or not playing.")
|
logger.debug("DisplayController received music update (via callback): Track is None or not playing.")
|
||||||
|
|
||||||
if self.current_display_mode == 'music' and self.music_manager:
|
if self.current_display_mode == 'music' and self.music_manager:
|
||||||
logger.info("Music is current display mode and track updated. Signaling immediate refresh and resetting mode timer.")
|
logger.info("Music is current display mode and track updated. Signaling immediate refresh.")
|
||||||
# Force the main loop to re-evaluate and re-display the current mode.
|
|
||||||
self.last_switch = time.time() # Reset the timer to ensure this update is shown
|
|
||||||
self.force_clear = True # Tell the display method to clear before drawing
|
self.force_clear = True # Tell the display method to clear before drawing
|
||||||
# If the current display mode is music, the MusicManager's display method will be called
|
# If the current display mode is music, the MusicManager's display method will be called
|
||||||
# in the main loop and will use its own updated internal state. No explicit action needed here
|
# in the main loop and will use its own updated internal state. No explicit action needed here
|
||||||
|
|||||||
@@ -450,12 +450,12 @@ class MusicManager:
|
|||||||
local_last_album_art_url = self.last_album_art_url
|
local_last_album_art_url = self.last_album_art_url
|
||||||
local_album_art_image = self.album_art_image
|
local_album_art_image = self.album_art_image
|
||||||
|
|
||||||
logger.debug(f"[MusicManager.display] Current display info before check: {current_display_info}")
|
# logger.debug(f"[MusicManager.display] Current display info before check: {current_display_info}") # Commented out for less verbose logging
|
||||||
if not current_display_info or current_display_info.get('title') == 'Nothing Playing':
|
if not current_display_info or current_display_info.get('title') == 'Nothing Playing':
|
||||||
logger.debug("[MusicManager.display] Entered 'Nothing Playing' block.")
|
# logger.debug("[MusicManager.display] Entered 'Nothing Playing' block.") # Commented out for less verbose logging
|
||||||
if not hasattr(self, '_last_nothing_playing_log_time') or \
|
if not hasattr(self, '_last_nothing_playing_log_time') or \
|
||||||
time.time() - getattr(self, '_last_nothing_playing_log_time', 0) > 30:
|
time.time() - getattr(self, '_last_nothing_playing_log_time', 0) > 30:
|
||||||
logger.info("Music Screen (MusicManager): Nothing playing or info explicitly 'Nothing Playing'.")
|
logger.debug("Music Screen (MusicManager): Nothing playing or info explicitly 'Nothing Playing'.") # Changed from INFO to DEBUG
|
||||||
self._last_nothing_playing_log_time = time.time()
|
self._last_nothing_playing_log_time = time.time()
|
||||||
|
|
||||||
# Only redraw "Nothing Playing" if we weren't already showing it or if force_clear is true
|
# Only redraw "Nothing Playing" if we weren't already showing it or if force_clear is true
|
||||||
@@ -486,7 +486,7 @@ class MusicManager:
|
|||||||
|
|
||||||
# If we've reached here, it means we are about to display actual music info.
|
# If we've reached here, it means we are about to display actual music info.
|
||||||
self.is_currently_showing_nothing_playing = False # Reset flag
|
self.is_currently_showing_nothing_playing = False # Reset flag
|
||||||
logger.debug("[MusicManager.display] Proceeding to display actual music info.")
|
# logger.debug("[MusicManager.display] Proceeding to display actual music info.") # Commented out for less verbose logging
|
||||||
if not self.is_music_display_active:
|
if not self.is_music_display_active:
|
||||||
self.activate_music_display()
|
self.activate_music_display()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user