mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-20 00:42:59 +00:00
fix display start time on odds ticker and added amazon prime video logo to broadcast
This commit is contained in:
BIN
assets/broadcast_logos/prime.png
Normal file
BIN
assets/broadcast_logos/prime.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 24 KiB |
@@ -1437,6 +1437,11 @@ class OddsTickerManager:
|
|||||||
logger.debug("Odds ticker is disabled, exiting display method.")
|
logger.debug("Odds ticker is disabled, exiting display method.")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
# Initialize display start time if not set
|
||||||
|
if not hasattr(self, '_display_start_time'):
|
||||||
|
self._display_start_time = time.time()
|
||||||
|
logger.debug(f"Initialized display start time: {self._display_start_time}")
|
||||||
|
|
||||||
logger.debug(f"Number of games in data at start of display method: {len(self.games_data)}")
|
logger.debug(f"Number of games in data at start of display method: {len(self.games_data)}")
|
||||||
if not self.games_data:
|
if not self.games_data:
|
||||||
logger.warning("Odds ticker has no games data. Attempting to update...")
|
logger.warning("Odds ticker has no games data. Attempting to update...")
|
||||||
@@ -1493,7 +1498,6 @@ class OddsTickerManager:
|
|||||||
# Check if we're at a natural break point for mode switching
|
# Check if we're at a natural break point for mode switching
|
||||||
# If we're near the end of the display duration and not at a clean break point,
|
# If we're near the end of the display duration and not at a clean break point,
|
||||||
# adjust the scroll position to complete the current game display
|
# adjust the scroll position to complete the current game display
|
||||||
if hasattr(self, '_display_start_time'):
|
|
||||||
elapsed_time = current_time - self._display_start_time
|
elapsed_time = current_time - self._display_start_time
|
||||||
remaining_time = self.dynamic_duration - elapsed_time
|
remaining_time = self.dynamic_duration - elapsed_time
|
||||||
|
|
||||||
@@ -1511,9 +1515,6 @@ class OddsTickerManager:
|
|||||||
# Not enough time, reset to beginning for clean transition
|
# Not enough time, reset to beginning for clean transition
|
||||||
logger.debug(f"Display ending soon, resetting scroll position for clean transition")
|
logger.debug(f"Display ending soon, resetting scroll position for clean transition")
|
||||||
self.scroll_position = 0
|
self.scroll_position = 0
|
||||||
else:
|
|
||||||
# First time through, record the start time
|
|
||||||
self._display_start_time = current_time
|
|
||||||
|
|
||||||
# Create the visible part of the image by pasting from the ticker_image
|
# Create the visible part of the image by pasting from the ticker_image
|
||||||
visible_image = Image.new('RGB', (width, height))
|
visible_image = Image.new('RGB', (width, height))
|
||||||
|
|||||||
Reference in New Issue
Block a user