Commit 1fdcd2bf authored by Your Name's avatar Your Name

Fix redistribution cap logic and bump version to 10.0.23

- Fix: Changed accumulated_shortfall += adjustment to -= adjustment in games_thread.py
  When overdistributing, we now properly decrease the redistribution balance
- Version: Bumped from 10.0.22 to 10.0.23 (and 10.0r22 to 10.0r23)
parent 956ae483
...@@ -14,7 +14,7 @@ from typing import List, Dict, Any ...@@ -14,7 +14,7 @@ from typing import List, Dict, Any
# Build configuration # Build configuration
BUILD_CONFIG = { BUILD_CONFIG = {
'app_name': 'MbetterClient', 'app_name': 'MbetterClient',
'app_version': '10.0.22', 'app_version': '10.0.23',
'description': 'Cross-platform multimedia client application', 'description': 'Cross-platform multimedia client application',
'author': 'MBetter Team', 'author': 'MBetter Team',
'entry_point': 'main.py', 'entry_point': 'main.py',
......
...@@ -217,7 +217,7 @@ Examples: ...@@ -217,7 +217,7 @@ Examples:
parser.add_argument( parser.add_argument(
'--version', '--version',
action='version', action='version',
version='MbetterClient 10.0.22' version='MbetterClient 10.0.23'
) )
# Timer options # Timer options
......
...@@ -4,7 +4,7 @@ MbetterClient - Cross-platform multimedia client application ...@@ -4,7 +4,7 @@ MbetterClient - Cross-platform multimedia client application
A multi-threaded application with video playback, web dashboard, and REST API integration. A multi-threaded application with video playback, web dashboard, and REST API integration.
""" """
__version__ = "10.0.22" __version__ = "10.0.23"
__author__ = "MBetter Project" __author__ = "MBetter Project"
__email__ = "dev@mbetter.net" __email__ = "dev@mbetter.net"
__description__ = "Cross-platform multimedia client with video overlay and web dashboard" __description__ = "Cross-platform multimedia client with video overlay and web dashboard"
......
...@@ -262,7 +262,7 @@ class ApiConfig: ...@@ -262,7 +262,7 @@ class ApiConfig:
# Request settings # Request settings
verify_ssl: bool = True verify_ssl: bool = True
user_agent: str = "MbetterClient/10.0r22" user_agent: str = "MbetterClient/10.0r23"
max_response_size_mb: int = 100 max_response_size_mb: int = 100
# Additional API client settings # Additional API client settings
...@@ -403,7 +403,7 @@ class AppSettings: ...@@ -403,7 +403,7 @@ class AppSettings:
timer: TimerConfig = field(default_factory=TimerConfig) timer: TimerConfig = field(default_factory=TimerConfig)
# Application settings # Application settings
version: str = "10.0.22" version: str = "10.0.23"
debug_mode: bool = False debug_mode: bool = False
dev_message: bool = False # Enable debug mode showing only message bus messages dev_message: bool = False # Enable debug mode showing only message bus messages
debug_messages: bool = False # Show all messages passing through the message bus on screen debug_messages: bool = False # Show all messages passing through the message bus on screen
......
...@@ -3095,7 +3095,10 @@ class GamesThread(ThreadedComponent): ...@@ -3095,7 +3095,10 @@ class GamesThread(ThreadedComponent):
logger.info(f"Created global redistribution adjustment record with adjustment {adjustment:.2f}") logger.info(f"Created global redistribution adjustment record with adjustment {adjustment:.2f}")
else: else:
# Update existing global record # Update existing global record
adjustment_record.accumulated_shortfall += adjustment # When overdistributing (negative adjustment), we need to DECREASE the redistribution
# balance by subtracting the negative amount, not add it. This ensures overdistributing
# reduces the negative accumulated shortfall faster (recovery behavior).
adjustment_record.accumulated_shortfall -= adjustment
adjustment_record.total_payin += payin_amount adjustment_record.total_payin += payin_amount
adjustment_record.total_redistributed += redistributed_amount adjustment_record.total_redistributed += redistributed_amount
adjustment_record.cap_percentage = cap_percentage # Update to latest adjustment_record.cap_percentage = cap_percentage # Update to latest
......
...@@ -230,7 +230,7 @@ class WebDashboard(ThreadedComponent): ...@@ -230,7 +230,7 @@ class WebDashboard(ThreadedComponent):
def inject_globals(): def inject_globals():
return { return {
'app_name': 'MbetterClient', 'app_name': 'MbetterClient',
'app_version': '10.0.22', 'app_version': '10.0.23',
'current_time': time.time(), 'current_time': time.time(),
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment