diff --git a/ForrestHub-app/assets/js/forrestHubLib.js b/ForrestHub-app/assets/js/forrestHubLib.js index c578576..a2dfea7 100644 --- a/ForrestHub-app/assets/js/forrestHubLib.js +++ b/ForrestHub-app/assets/js/forrestHubLib.js @@ -19,7 +19,7 @@ class ForrestHubLib { this.addEventListenerKey('connect', () => { console.log('Connected to the server!'); - this.socket.emit('get_game_status'); + this.socket.emit('get_game_status', null); this.removeOverlay(); }); diff --git a/ForrestHub-app/config.py b/ForrestHub-app/config.py index 9e79c15..dd253e2 100644 --- a/ForrestHub-app/config.py +++ b/ForrestHub-app/config.py @@ -45,13 +45,16 @@ class Config: # check if exist if not TEMPLATES_FOLDER_LIVE.exists(): - raise FileNotFoundError(f"Templates folder not found: {TEMPLATES_FOLDER}") + TEMPLATES_FOLDER_LIVE = None + # raise FileNotFoundError(f"Templates folder not found: {TEMPLATES_FOLDER}") if not GAMES_FOLDER_LIVE.exists(): - raise FileNotFoundError(f"Games folder not found: {GAMES_FOLDER}") + GAMES_FOLDER_LIVE = None + # raise FileNotFoundError(f"Games folder not found: {GAMES_FOLDER}") if not ASSETS_FOLDER_LIVE.exists(): - raise FileNotFoundError(f"Assets folder not found: {ASSETS_FOLDER}") + ASSETS_FOLDER_LIVE = None + # raise FileNotFoundError(f"Assets folder not found: {ASSETS_FOLDER}") # Disable debug and reloader when using frozen data with live data - production mode if not LIVE_DATA_USED and FROZEN: diff --git a/ForrestHub-app/games/admin/index.js b/ForrestHub-app/games/admin/index.js index 7d60a6b..4f63735 100644 --- a/ForrestHub-app/games/admin/index.js +++ b/ForrestHub-app/games/admin/index.js @@ -8,7 +8,7 @@ let globalData = {}; forrestHubLib.addEventListenerKey("connect", async () => { forrestHubLib.showAlert('success', 'Připojeno k serveru.'); await loadAndDisplayData(); - forrestHubLib.emit('get_game_status'); + forrestHubLib.emit('get_game_status', null); }); diff --git a/ForrestHub-app/run.py b/ForrestHub-app/run.py index 10454d0..8b47ec0 100644 --- a/ForrestHub-app/run.py +++ b/ForrestHub-app/run.py @@ -59,9 +59,9 @@ def run_flask(config="config.Config"): logger = setup_logging(config.EXECUTABLE_DIR, config.LOG_FOLDER) logging.basicConfig(level=logging.INFO) - if not config.DEBUG: - webbrowser.open(f"http://{config.IP_ADDRESS}:{config.PORT}") - webbrowser.open(f"http://{config.IP_ADDRESS}:{config.PORT}/admin") + # if not config.DEBUG: + webbrowser.open(f"http://{config.IP_ADDRESS}:{config.PORT}") + webbrowser.open(f"http://{config.IP_ADDRESS}:{config.PORT}/admin") try: local_ip = f"http://{config.IP_ADDRESS}:{config.PORT}"