From 147643edc539e2162f51bb288a3ae8b356e7fe37 Mon Sep 17 00:00:00 2001 From: ChuckBuilds <33324927+ChuckBuilds@users.noreply.github.com> Date: Fri, 18 Apr 2025 10:53:47 -0500 Subject: [PATCH] Fix NHL display method to use correct DisplayManager API - Replace display_image with image.paste and update_display - Update all NHL manager classes to use proper display methods --- src/nhl_managers.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/nhl_managers.py b/src/nhl_managers.py index 06e5c605..d25a1e9f 100644 --- a/src/nhl_managers.py +++ b/src/nhl_managers.py @@ -196,7 +196,8 @@ class BaseNHLManager: draw.text((status_x, status_y), self.current_game["status_text"], font=self.fonts['status'], fill=(255, 255, 255)) # Display the image - self.display_manager.display_image(img) + self.display_manager.image.paste(img, (0, 0)) + self.display_manager.update_display() logging.debug("[NHL] Successfully displayed game") except Exception as e: @@ -327,7 +328,8 @@ class NHLLiveManager(BaseNHLManager): draw.text((status_x, status_y), f"{period_str} {clock}", font=self.fonts['status'], fill=(255, 255, 255)) # Display the image - self.display_manager.display_image(img) + self.display_manager.image.paste(img, (0, 0)) + self.display_manager.update_display() logging.debug("[NHL] Successfully displayed test game") except Exception as e: @@ -452,7 +454,8 @@ class NHLRecentManager(BaseNHLManager): draw.text((status_x, status_y), "FINAL", font=self.fonts['status'], fill=(255, 255, 255)) # Display the image - self.display_manager.display_image(img) + self.display_manager.image.paste(img, (0, 0)) + self.display_manager.update_display() logging.debug("[NHL] Successfully displayed recent game") except Exception as e: @@ -574,7 +577,8 @@ class NHLUpcomingManager(BaseNHLManager): draw.text((status_x, status_y), self.current_game["status_text"], font=self.fonts['status'], fill=(255, 255, 255)) # Display the image - self.display_manager.display_image(img) + self.display_manager.image.paste(img, (0, 0)) + self.display_manager.update_display() logging.debug("[NHL] Successfully displayed upcoming game") except Exception as e: