• 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
Name
Last commit
Last update
assets Loading commit data...
mbetterclient Loading commit data...
packages Loading commit data...
uploads Loading commit data...
.gitignore Loading commit data...
CHANGELOG.md Loading commit data...
DOCUMENTATION.md Loading commit data...
LICENSE Loading commit data...
PyQt6_UPGRADE_SUMMARY.md Loading commit data...
PyQt6_VIDEO_PLAYER_DOCUMENTATION.md Loading commit data...
README.md Loading commit data...
build.bat Loading commit data...
build.py Loading commit data...
build.sh Loading commit data...
cookies.txt Loading commit data...
create_test_matches.py Loading commit data...
debug_webapp_ssl.py Loading commit data...
extract_js.py Loading commit data...
main.py Loading commit data...
requirements.txt Loading commit data...
temp_js.js Loading commit data...