mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-10 21:03:01 +00:00
update leaderboard data sources for other sports and font sizes
This commit is contained in:
@@ -1349,13 +1349,13 @@ class OddsTickerManager:
|
||||
# and add extra time to ensure we don't cut off mid-scroll
|
||||
if self.loop:
|
||||
# Add extra buffer for looping to ensure smooth transition
|
||||
# Use a larger buffer to ensure complete content display
|
||||
loop_buffer = total_time * 0.3 # 30% extra for looping (increased from 20%)
|
||||
# Use a more reasonable buffer to prevent excessive looping
|
||||
loop_buffer = total_time * 0.15 # 15% extra for looping (reduced from 30%)
|
||||
calculated_duration = int(total_time + buffer_time + loop_buffer)
|
||||
logger.debug(f"Looping enabled, added {loop_buffer:.2f}s loop buffer")
|
||||
else:
|
||||
# Even without looping, add extra buffer to ensure complete display
|
||||
extra_buffer = total_time * 0.15 # 15% extra to ensure complete content display
|
||||
extra_buffer = total_time * 0.1 # 10% extra to ensure complete content display (reduced from 15%)
|
||||
calculated_duration = int(total_time + buffer_time + extra_buffer)
|
||||
logger.debug(f"No looping, added {extra_buffer:.2f}s extra buffer for complete display")
|
||||
|
||||
@@ -1371,9 +1371,9 @@ class OddsTickerManager:
|
||||
|
||||
# Additional safety check: if the calculated duration seems too short for the content,
|
||||
# ensure we have enough time to display all content properly
|
||||
if self.dynamic_duration < 45 and self.total_scroll_width > 500:
|
||||
if self.dynamic_duration < 30 and self.total_scroll_width > 800:
|
||||
# If we have a lot of content but short duration, increase it
|
||||
self.dynamic_duration = max(45, int(self.total_scroll_width / 20)) # At least 45s or 1s per 20px
|
||||
self.dynamic_duration = max(30, int(self.total_scroll_width / 30)) # At least 30s or 1s per 30px
|
||||
logger.debug(f"Adjusted duration for large content: {self.dynamic_duration}s")
|
||||
|
||||
logger.debug(f"Odds ticker dynamic duration calculation:")
|
||||
|
||||
Reference in New Issue
Block a user