From 5937f968ef3b96ffd6eb29690b19d10a0129bb32 Mon Sep 17 00:00:00 2001 From: Chuck <33324927+ChuckBuilds@users.noreply.github.com> Date: Fri, 12 Sep 2025 17:28:11 -0400 Subject: [PATCH] change duration buffer on odds ticker --- config/config.json | 2 +- src/odds_ticker_manager.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/config/config.json b/config/config.json index ee98d113..4c46b1e3 100644 --- a/config/config.json +++ b/config/config.json @@ -151,7 +151,7 @@ "dynamic_duration": true, "min_duration": 30, "max_duration": 300, - "duration_buffer": 0.1 + "duration_buffer": 0.05 }, "leaderboard": { "enabled": true, diff --git a/src/odds_ticker_manager.py b/src/odds_ticker_manager.py index 351fd322..09130750 100644 --- a/src/odds_ticker_manager.py +++ b/src/odds_ticker_manager.py @@ -1380,14 +1380,14 @@ class OddsTickerManager: # If looping is enabled, ensure we complete at least one full cycle # 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 more generous buffer to ensure complete content display - loop_buffer = total_time * 0.2 # 20% extra for looping (increased from 15%) + # Add minimal buffer for looping to ensure smooth transition + # Reduced buffer to prevent excessive duration while maintaining smoothness + loop_buffer = total_time * 0.05 # 5% extra for looping (reduced from 20%) 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 (increased from 10%) + # Even without looping, add minimal buffer to ensure complete display + extra_buffer = total_time * 0.05 # 5% 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")