1. 08 Sep, 2025 3 commits
    • Stefy Lanza (nextime / spora )'s avatar
    • Stefy Lanza (nextime / spora )'s avatar
      91f5dece
    • Stefy Lanza (nextime / spora )'s avatar
      Optimize PyInstaller build and clean codebase · 2a789078
      Stefy Lanza (nextime / spora ) authored
      - Reduce PyInstaller binary libraries to eliminate segfaults:
        * Remove 25+ unnecessary X11/GL libraries from build.py
        * Keep only essential libraries: libxcb.so.1 and libX11.so.6
        * Update mbetter_discovery_linux.spec with minimal libraries
        * Remove qt.conf and platforms directory copying for self-contained binary
      
      - Clean up codebase by removing unused files:
        * Remove qt6_player.py (unused duplicate implementation)
        * Remove temp_js.js and extract_js.py (utility files)
        * Remove hook-pyqt6.py and runtime_hook.py (disabled/unnecessary)
      
      - Enhance build scripts:
        * Update MbetterClient_wrapper.sh with video safety measures
        * Update clean.sh to preserve .exe files while removing artifacts
        * Add comprehensive error handling for virtualized environments
      
      - Restore important assets:
        * Restore dist/MBetterDiscovery.exe from git repository
      
      Result: Self-contained binary with reduced library conflicts, better compatibility across Linux distributions and virtualized environments.
      2a789078
  2. 05 Sep, 2025 18 commits
  3. 28 Aug, 2025 2 commits
    • Stefy Lanza (nextime / spora )'s avatar
      Fix Qt player API connectivity issues for overlay templates · d419bb79
      Stefy Lanza (nextime / spora ) authored
      CRITICAL FIX: Resolved 'Failed to fetch' errors in overlay templates
      
      API CONNECTIVITY ENHANCEMENTS:
      - Modified fixtures template JavaScript to use configurable webServerBaseUrl instead of relative URLs
      - Enhanced Qt player WebChannel system to pass web server base URL (http://127.0.0.1:5001) to all overlay templates
      - Updated PlayerWindow._get_web_server_base_url() method to provide consistent API endpoint configuration
      - Enhanced QtVideoPlayer._get_web_server_base_url() method for cross-component consistency
      - Modified all overlay data updates (play_video, update_overlay_periodically, default overlay loading) to include webServerBaseUrl
      
      TEMPLATE SYSTEM IMPROVEMENTS:
      - Fixed API request URLs in fixtures template from relative (/api/endpoint) to absolute (http://127.0.0.1:5001/api/endpoint)
      - Enhanced template initialization to receive web server configuration via WebChannel updateOverlayData()
      - Improved fallback mechanism with proper API endpoint resolution
      
      ROOT CAUSE RESOLUTION:
      - Templates loaded via local schemes (file://, qrc://) cannot resolve relative API URLs
      - WebChannel system now provides absolute web server URLs to enable proper API communication
      - All overlay templates now have access to webServerBaseUrl for API requests
      
      This fix ensures Qt player overlay templates can successfully communicate with the Flask web dashboard API endpoints, eliminating 'TypeError: Failed to fetch' errors and enabling proper data display.
      d419bb79
    • Stefy Lanza (nextime / spora )'s avatar
      Version 1.2.11: Fix video loop functionality and fixtures template issues · 0c5c072b
      Stefy Lanza (nextime / spora ) authored
      Major fixes and improvements:
      
      VIDEO LOOP FUNCTIONALITY:
      - Fixed critical import scope error where Message class was locally imported in play_loop action but unavailable to stop_loop action
      - Implemented comprehensive EndOfMedia detection and auto-restart mechanisms in Qt player
      - Added ERROR-level diagnostic logging throughout video loop control system for precise issue identification
      - Enhanced loop control parameters with infinite_loop, loop_count, and continuous_playback flags
      - Fixed video playback state management with proper loop parameter processing
      
      FIXTURES TEMPLATE ENHANCEMENTS:
      - Removed hardcoded HTML content and implemented dynamic JavaScript data loading
      - Enhanced fallback data system with realistic fighter names (John Doe vs Mike Smith, Alex Johnson vs Chris Brown)
      - Improved template initialization with proper loading states and API error handling
      - Fixed template data display to show proper fallback when API endpoints are unavailable
      
      TECHNICAL IMPROVEMENTS:
      - Updated build configuration to version 1.2.11
      - Enhanced PyQt6 media player loop control with MediaStatus handling
      - Improved message bus architecture for cross-thread communication between web dashboard and Qt player
      - Enhanced Flask API development with better parameter handling and message publishing
      - Updated comprehensive project documentation (CHANGELOG.md and README.md)
      
      DIAGNOSTIC SYSTEMS:
      - Implemented comprehensive ERROR-level logging system throughout Qt player for high-visibility debugging
      - Added systematic issue identification capabilities
      - Enhanced video loop diagnostics with complete state tracking
      - Improved template loading architecture with timeout handling and graceful degradation
      
      All core functionality has been tested and validated with diagnostic systems in place for identifying any remaining edge cases.
      0c5c072b
  4. 26 Aug, 2025 15 commits
    • Stefy Lanza (nextime / spora )'s avatar
      v1.2.10: Fix critical betting system bugs and enhance stability · 638edd7e
      Stefy Lanza (nextime / spora ) authored
      Critical Fixes:
      - Fixed SQLite NOT NULL constraint violation in bet creation API by properly extracting fixture_id from match data
      - Resolved 500 error in bet details page route by implementing complete database data fetching and template variable population
      - Fixed moment() undefined template rendering error by removing server-side JavaScript calls and using client-side time handling
      - Corrected JavaScript API endpoint mismatches (POST /cancel vs DELETE /bets/{uuid}) and added missing event handlers
      
      Bug Fixes:
      - Enhanced bet creation logic to query MatchModel and extract fixture_id from first bet detail's match
      - Implemented comprehensive bet details route with database session management and statistics calculation
      - Fixed template compatibility issues by eliminating server-side/client-side JavaScript conflicts
      - Added proper event listeners for delete bet detail buttons in bet management interface
      
      Database & API Improvements:
      - Ensured proper foreign key relationships between bets, bet_details, and matches tables
      - Enhanced error handling with proper HTTP status codes and user-friendly messages
      - Fixed attribute reference from column_value to float_value in MatchOutcomeModel queries
      - Improved database constraint compliance and data consistency validation
      
      Documentation Updates:
      - Updated README.md with version 1.2.10 critical bug fixes and stability improvements
      - Enhanced CHANGELOG.md with detailed technical fixes and implementation details
      - Added comprehensive troubleshooting section to DOCUMENTATION.md with root cause analysis
      
      The betting system is now fully functional with:
       Complete CRUD operations without database constraint violations
       Proper bet details page display with comprehensive information
       Fixed JavaScript API interactions and event handling
       Stable template rendering without server-side JavaScript conflicts
       Enhanced error handling and user experience
      638edd7e
    • Stefy Lanza (nextime / spora )'s avatar
      fix: Correct attribute name in betting outcomes API · f22b4a1e
      Stefy Lanza (nextime / spora ) authored
      - Fixed 'MatchOutcomeModel' object has no attribute 'column_value' error
      - Changed outcome.column_value to outcome.float_value to match database model
      - API endpoint /api/cashier/available-matches now works correctly
      f22b4a1e
    • Stefy Lanza (nextime / spora )'s avatar
      feat: Implement dynamic betting outcomes and print functionality · 93ffae85
      Stefy Lanza (nextime / spora ) authored
      - Replace hardcoded WIN1/WIN2/X betting terminology with database-driven outcomes
      - Enhanced /cashier/available-matches API endpoint to query match_outcomes table
      - Added generateOutcomeOptionsHTML() function for dynamic betting option generation
      - Implemented graceful fallback to standard options when database outcomes unavailable
      - Added print button to bets list in cashier dashboard with placeholder functionality
      - Enhanced API response structure with outcome_id, outcome_name, outcome_value, display_name
      - Updated documentation with comprehensive betting system section
      - Added troubleshooting guides and performance optimization details
      - Version 1.2.9 changelog and README updates with new features
      93ffae85
    • Stefy Lanza (nextime / spora )'s avatar
      Version 1.2.8: Offline CDN Fallback & Enhanced Cashier Interface · e8012cdc
      Stefy Lanza (nextime / spora ) authored
      Features:
      - Added comprehensive offline CDN fallback system with local Bootstrap and FontAwesome
      - Enhanced cashier interface with streamlined navigation (logo + clock + user menu only)
      - Implemented automatic CDN-to-local resource switching for network environments
      - Added PyInstaller integration for offline functionality in executable builds
      
      Technical Improvements:
      - Fixed FontAwesome icon display issues with proper CDN priority and local fallback
      - Optimized cashier navbar layout for focused, distraction-free interface
      - Added local vendor directory with complete Bootstrap 5.3.0 and FontAwesome 6.0.0
      - Implemented JavaScript-based resource availability detection
      - Enhanced PyInstaller build configuration for automatic vendor file inclusion
      
      Documentation Updates:
      - Updated README.md with version 1.2.8 improvements
      - Enhanced CHANGELOG.md with detailed feature descriptions
      - Added comprehensive offline capabilities section to DOCUMENTATION.md
      - Documented cashier interface navigation and access control
      
      Files Modified:
      - mbetterclient/web_dashboard/templates/base.html (CDN fallback, navbar layout)
      - mbetterclient/web_dashboard/static/vendor/ (new directory with CDN resources)
      - CHANGELOG.md, README.md, DOCUMENTATION.md (documentation updates)
      - build.py (PyInstaller integration verified)
      
      This release ensures MbetterClient works seamlessly in offline network environments while providing a cleaner, more focused cashier interface.
      e8012cdc
    • Stefy Lanza (nextime / spora )'s avatar
      Version 1.2.7: Fix API client health monitoring and add betting mode configuration · 126fa697
      Stefy Lanza (nextime / spora ) authored
      - Fixed 'Unhealthy components detected: api_client' warning by implementing comprehensive heartbeat system
      - Added heartbeat calls in main loop, HTTP requests, database operations, and error handling
      - Added betting mode configuration UI in web dashboard with database persistence
      - Created Migration_015_AddBettingModeTable for betting_modes table
      - Added betting mode API endpoints (GET/POST /api/betting-mode)
      - Updated documentation with betting mode configuration and API client health monitoring
      - Enhanced error handling to prevent thread hangs and maintain health status
      - Added troubleshooting section for API client health issues
      126fa697
    • Stefy Lanza (nextime / spora )'s avatar
      fix: Register MatchTimerComponent with message bus · 4ddf7439
      Stefy Lanza (nextime / spora ) authored
      - Add message_bus.register_component() call in MatchTimerComponent constructor
      - Add message_bus.unregister_component() call in shutdown method
      - Fixes 'Recipient match_timer not found' warning when sending messages
      - Ensures proper message routing to the match timer component
      - Component can now receive START_GAME, SCHEDULE_GAMES, and CUSTOM messages
      4ddf7439
    • Stefy Lanza (nextime / spora )'s avatar
      feat: Implement real-time notifications with long polling · c0463982
      Stefy Lanza (nextime / spora ) authored
      - Add /api/notifications endpoint for long polling real-time updates
      - Implement JavaScript long polling in base template for all dashboards
      - Add START_GAME, MATCH_START, and GAME_STATUS message handling
      - Update cashier dashboard with real-time timer and status updates
      - Handle match status updates when messages are received
      - Add visual notifications with toast messages
      - Implement automatic reconnection with exponential backoff
      - Update match timer display and pending matches list in real-time
      - Add event-driven architecture for dashboard updates
      
      Features:
      - Long polling requests every 30 seconds for real-time updates
      - START_GAME message starts countdown timer and updates status
      - MATCH_START message resets timer and shows running state
      - GAME_STATUS message updates match status and refreshes data
      - Automatic UI updates without page refresh
      - Toast notifications for important events
      - Robust error handling and reconnection logic
      c0463982
    • Stefy Lanza (nextime / spora )'s avatar
      refactor: Consolidate message types - rename START_GAMES to SCHEDULE_GAMES · 74557512
      Stefy Lanza (nextime / spora ) authored
      - Rename START_GAMES message type to SCHEDULE_GAMES for clarity
      - Add schedule_games() method to MessageBuilder class
      - Update all references in games_thread.py, match_timer.py, routes.py, and tests
      - Improve message naming consistency:
        * START_GAME: Actually starts games/timers
        * SCHEDULE_GAMES: Changes status to scheduled (doesn't start timer)
      - All message types now follow consistent naming convention
      - Fixes potential confusion between starting and scheduling actions
      74557512
    • Stefy Lanza (nextime / spora )'s avatar
      feat: Remove betting mode select menu from cashier dashboard · d5cdad5a
      Stefy Lanza (nextime / spora ) authored
      - Remove betting mode configuration section from cashier.html template
      - Remove associated JavaScript functions (loadCashierBettingMode, saveBettingMode)
      - Clean up event listeners and initialization code
      - Betting mode functionality is now restricted to admin users only
      - Improves UI by removing irrelevant features for cashier role
      d5cdad5a
    • Stefy Lanza (nextime / spora )'s avatar
      fix: Add missing heartbeat to MatchTimerComponent · b188a174
      Stefy Lanza (nextime / spora ) authored
      - Add self.heartbeat() call in MatchTimerComponent run loop
      - Fixes unhealthy component warning for match_timer
      - Ensures proper health monitoring for the timer component
      - Component will now pass health checks and not appear in unhealthy list
      b188a174
    • Stefy Lanza (nextime / spora )'s avatar
      fix: Add missing Flask 'g' import to routes.py · 7d3b1b04
      Stefy Lanza (nextime / spora ) authored
      - Fix NameError: name 'g' is not defined in get_match_timer_state() function
      - Add 'g' to Flask imports in routes.py
      - This resolves the 500 error when accessing /api/match-timer/state endpoint
      7d3b1b04
    • Stefy Lanza (nextime / spora )'s avatar
      feat: Add automated game timer with --start-timer command line switch · 13175bf9
      Stefy Lanza (nextime / spora ) authored
      - Add --start-timer command line argument with configurable delay (default 4 minutes)
      - Implement MatchTimerComponent integration with proper initialization and registration
      - Add timer state API endpoints for web dashboard integration
      - Enhance message bus communication between timer component and web dashboard
      - Update documentation and changelog with comprehensive timer feature details
      - Fix timer component not being initialized during application startup
      - Add timer state caching and real-time API endpoint integration
      
      The timer automatically sends START_GAME messages after the specified delay,
      enabling automated match progression without manual intervention.
      13175bf9
    • Stefy Lanza (nextime / spora )'s avatar
      docs: Add comprehensive match timer system documentation · 17a5dc02
      Stefy Lanza (nextime / spora ) authored
      - Add complete match timer system section to documentation
      - Document timer display locations and visual states
      - Explain automatic match progression algorithm
      - Detail API endpoints for timer configuration and match starting
      - Document message bus integration with MATCH_START message
      - Add troubleshooting section for timer issues
      - Include performance optimization details
      - Document configuration options and visual styling
      - Add examples for API usage and error handling
      17a5dc02
    • Stefy Lanza (nextime / spora )'s avatar
      feat: Add countdown timer for match intervals · 97cca9c5
      Stefy Lanza (nextime / spora ) authored
      - Add MATCH_START message type to message bus for match status changes
      - Implement countdown timer in both user and cashier interfaces
      - Create API endpoints for match timer configuration and match starting
      - Add timer display to status bar and navbar with visual feedback
      - Implement automatic match progression when timer reaches zero
      - Add CSS styling with color-coded states and animations
      - Timer defaults to configured match interval (20 minutes)
      - Automatically finds and starts next available match in priority order
      - Stops timer when no matches are available to start
      
      Features:
      - Real-time countdown with MM:SS format display
      - Color-coded timer states (normal/warning/danger)
      - Automatic match status progression via message bus
      - Priority-based match selection (bet -> scheduled -> pending)
      - Responsive design for both desktop and mobile
      - Error handling and graceful fallbacks
      - Integration with existing dashboard notification system
      97cca9c5
    • Stefy Lanza (nextime / spora )'s avatar
      feat: Add extraction management page and server time digital clock · 2966ca0e
      Stefy Lanza (nextime / spora ) authored
      - Add comprehensive extraction management page with drag-and-drop interface
      - Implement server time digital clock showing time from mbetterc machine
      - Create database models for extraction associations and game configuration
      - Add database migration for new tables with proper indexing
      - Implement REST API endpoints for extraction management
      - Add server time API endpoint for accurate time synchronization
      - Update navigation to include extraction management page
      - Add digital clock to all dashboard interfaces including cashier dashboard
      - Implement default outcome associations (WIN1, X, WIN2)
      - Add time limit configuration for UNDER/OVER outcomes
      - Update documentation with comprehensive extraction system details
      - Add troubleshooting section for extraction and clock features
      
      Features:
      - Drag-and-drop outcome association management
      - Multi-association support for outcomes
      - Trash bin removal functionality
      - Real-time server time display (24-hour format)
      - Cross-interface clock availability
      - Database persistence for all settings
      - Professional UI with responsive design
      - Error handling and graceful fallbacks
      2966ca0e
  5. 22 Aug, 2025 1 commit
    • Stefy Lanza (nextime / spora )'s avatar
      feat: Add comprehensive screen casting system with Chromecast integration · 40636f79
      Stefy Lanza (nextime / spora ) authored
      - Add ScreenCastComponent: New threaded component for screen capture and streaming
      - Implement FFmpeg-based cross-platform screen capture (Linux, Windows, macOS)
      - Add Chromecast device discovery and streaming using pychromecast
      - Create web-based screen cast interface at /screen_cast with real-time controls
      - Add HTTP streaming server for Chromecast-compatible video delivery
      - Integrate screen cast settings into web dashboard configuration panel
      - Add --no-screen-cast command line flag (enabled by default)
      - Update dependencies: ffmpeg-python>=0.2.0, pychromecast>=13.0.0
      
      New Files:
      - mbetterclient/core/screen_cast.py: Main ScreenCastComponent implementation
      - mbetterclient/web_dashboard/screen_cast_routes.py: Flask API routes
      - mbetterclient/web_dashboard/templates/dashboard/screen_cast.html: Web interface
      - test_screen_cast_integration.py: Integration test suite
      
      Key Features:
      - Real-time device discovery and status updates
      - Platform-specific audio/video input sources
      - Quality settings (resolution, frame rate, bitrate)
      - Network stream URL generation for Chromecast access
      - Proper component lifecycle management and cleanup
      - Message bus integration with WEB_ACTION support
      
      Documentation:
      - Updated README.md with screen casting features and usage
      - Added comprehensive CHANGELOG.md entry for v1.2.4
      - Extended DOCUMENTATION.md with complete screen casting guide
      
      Architecture Enhancement:
      - Extended from 4 to 5 threaded components
      - Added ScreenCastConfig to settings with database persistence
      - Enhanced web dashboard navigation with screen cast section
      40636f79
  6. 21 Aug, 2025 1 commit
    • Stefy Lanza (nextime / spora )'s avatar
      Fix API timestamp format bug and complete fixtures management system (v1.2.3.1) · da6b6529
      Stefy Lanza (nextime / spora ) authored
      - Fixed critical API synchronization bug: send Unix timestamp as long integer instead of ISO datetime string
      - Updated _get_last_fixture_timestamp() to return str(fixture_active_time) for proper server compatibility
      - Added comprehensive fixtures management system with dashboard integration
      - Created fixtures list and detail pages with Bootstrap styling and admin controls
      - Enhanced API client with proper timestamp handling and authentication for ZIP downloads
      - Updated documentation (README.md, CHANGELOG.md, DOCUMENTATION.md) with new features
      - Completed fixtures dashboard with real-time synchronization and administrative controls
      - Fixed server communication to use proper Unix timestamp format: '1755773200' instead of '2025-08-21T14:31:3'
      da6b6529