update leaderboard data sources for other sports and font sizes

This commit is contained in:
Chuck
2025-09-12 13:35:01 -04:00
parent 32daced427
commit 335ab8cce0
4 changed files with 878 additions and 47 deletions

View File

@@ -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:")