Commit 6d3020e3 authored by Your Name's avatar Your Name

Update to r29

parent f2058d85
......@@ -14,7 +14,7 @@ from typing import List, Dict, Any
# Build configuration
BUILD_CONFIG = {
'app_name': 'MbetterClient',
'app_version': '10.0.23',
'app_version': '10.0.29',
'description': 'Cross-platform multimedia client application',
'author': 'MBetter Team',
'entry_point': 'main.py',
......
......@@ -217,7 +217,7 @@ Examples:
parser.add_argument(
'--version',
action='version',
version='MbetterClient 10.0.23'
version='MbetterClient 10.0.29'
)
# Timer options
......
......@@ -4,7 +4,7 @@ MbetterClient - Cross-platform multimedia client application
A multi-threaded application with video playback, web dashboard, and REST API integration.
"""
__version__ = "10.0.23"
__version__ = "10.0.29"
__author__ = "MBetter Project"
__email__ = "dev@mbetter.net"
__description__ = "Cross-platform multimedia client with video overlay and web dashboard"
......
......@@ -262,7 +262,7 @@ class ApiConfig:
# Request settings
verify_ssl: bool = True
user_agent: str = "MbetterClient/10.0r23"
user_agent: str = "MbetterClient/10.0r29"
max_response_size_mb: int = 100
# Additional API client settings
......@@ -403,7 +403,7 @@ class AppSettings:
timer: TimerConfig = field(default_factory=TimerConfig)
# Application settings
version: str = "10.0.23"
version: str = "10.0.29"
debug_mode: bool = False
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
......
This diff is collapsed.
......@@ -5179,9 +5179,25 @@ class QtVideoPlayer(QObject):
"""
try:
from ..database.models import GameConfigModel
from ..database.manager import DatabaseManager
import json
from pathlib import Path
from ..config.settings import get_user_data_dir
session = self.db_manager.get_session()
# Try to get db_manager, create one if not available
db_manager = getattr(self, 'db_manager', None)
if not db_manager:
logger.debug("No db_manager available, creating one temporarily")
db_path = get_user_data_dir() / "mbetterclient.db"
db_manager = DatabaseManager(str(db_path))
if not db_manager.initialize():
logger.warning("Failed to initialize temporary database manager")
# Return default based on outcome type
if outcome in ['UNDER', 'OVER']:
return "match_video.html"
return "results.html"
session = db_manager.get_session()
try:
# Get outcome template assignments from config
assignments_config = session.query(GameConfigModel).filter_by(
......
......@@ -230,7 +230,7 @@ class WebDashboard(ThreadedComponent):
def inject_globals():
return {
'app_name': 'MbetterClient',
'app_version': '10.0.23',
'app_version': '10.0.29',
'current_time': time.time(),
}
......
# MbetterClient v10.0.22
Cross-platform multimedia client application
## Installation
1. Extract this package to your desired location
2. Run the executable file
3. The application will create necessary configuration files on first run
## System Requirements
- **Operating System**: Linux 6.12.15-amd64
- **Architecture**: x86_64
- **Memory**: 512 MB RAM minimum, 1 GB recommended
- **Disk Space**: 100 MB free space
## Configuration
The application stores its configuration and database in:
- **Windows**: `%APPDATA%\MbetterClient`
- **macOS**: `~/Library/Application Support/MbetterClient`
- **Linux**: `~/.config/MbetterClient`
## Web Interface
By default, the web interface is available at: http://localhost:5001
Default login credentials:
- Username: admin
- Password: admin
**Please change the default password after first login.**
## Support
For support and documentation, please visit: https://git.nexlab.net/mbetter/mbetterc
## Version Information
- Version: 10.0.22
- Build Date: sissy
- Platform: Linux-6.12.15-amd64-x86_64-with-glibc2.42
#!/usr/bin/env python3
"""
Test script for the updated extract_match function with uopayin and mpayin parameters.
"""
import sys
import os
# Add the project root to the Python path
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
from mbetterclient.core.games_thread import extract_match
def test_extract_match_updated():
"""Test the updated extract_match function with separate uopayin and mpayin parameters."""
# Test data
balance = -50.0 # Negative balance (over-redistribution)
uopayin = 100.0 # UNDER + OVER bets total
mpayin = 200.0 # All other bets total
match = 1
cap = 70.0 # 70% redistribution cap
payouts = {
"UNDER": 80.0,
"OVER": 90.0,
"RESULTS": {
"KO1": ["WIN1", 150.0],
"WIN1": ["WIN1", 180.0]
}
}
odds = {
"UNDER": 2.0,
"OVER": 1.8,
"KO1": 3.0,
"WIN1": 2.5
}
print("Testing updated extract_match function...")
print(f"Parameters: balance={balance}, uopayin={uopayin}, mpayin={mpayin}, match={match}, cap={cap}")
print(f"Payouts: {payouts}")
print(f"Odds: {odds}")
try:
# Call the function
extract_match(balance, uopayin, mpayin, match, cap, payouts, odds)
print("✅ Function executed successfully!")
return True
except Exception as e:
print(f"❌ Function failed: {e}")
import traceback
traceback.print_exc()
return False
def test_parameter_validation():
"""Test that the function properly handles the new parameters."""
# Test with zero values
balance = 0.0
uopayin = 0.0
mpayin = 0.0
match = 1
cap = 50.0
payouts = {
"UNDER": 0.0,
"OVER": 0.0,
"RESULTS": {}
}
odds = {
"UNDER": 1.0,
"OVER": 1.0
}
print("\nTesting with zero values...")
try:
extract_match(balance, uopayin, mpayin, match, cap, payouts, odds)
print("✅ Zero values test passed!")
return True
except Exception as e:
print(f"❌ Zero values test failed: {e}")
return False
if __name__ == "__main__":
print("=" * 60)
print("TESTING UPDATED extract_match FUNCTION")
print("=" * 60)
success1 = test_extract_match_updated()
success2 = test_parameter_validation()
print("\n" + "=" * 60)
if success1 and success2:
print("🎉 ALL TESTS PASSED!")
sys.exit(0)
else:
print("💥 SOME TESTS FAILED!")
sys.exit(1)
\ No newline at end of file
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