dynamically define time on screen to rotate through odds ticker display

This commit is contained in:
Chuck
2025-07-20 21:28:29 -05:00
parent c45fb1b76f
commit 8b8b087f9a
2 changed files with 47 additions and 15 deletions

View File

@@ -447,6 +447,12 @@ class DisplayController:
def get_current_duration(self) -> int:
"""Get the duration for the current display mode."""
mode_key = self.current_display_mode
if mode_key == 'odds_ticker' and self.odds_ticker:
dynamic_duration = self.odds_ticker.get_dynamic_duration()
if dynamic_duration > 0:
return dynamic_duration
# Simplify weather key handling
if mode_key.startswith('weather_'):
return self.display_durations.get(mode_key, 15)