From b512328ac6630dca68485aad2fb76da4ff8fe5cb Mon Sep 17 00:00:00 2001 From: root Date: Thu, 25 Jun 2026 20:50:26 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20restore=20config=20URL=20sync=20?= =?UTF-8?q?=E2=80=94=20socket.url=20now=20correctly=20set=20to=20wss://ws.?= =?UTF-8?q?epicnabbo.nl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sync_configs() was missing the Python URL fix that patches: - socket.url → wss://ws.epicnabbo.nl - api.url, image.library.url, gamedata.url, etc. This caused renderer-config.json and ui-config.json to have broken wss://ws. values. Now sync_configs() applies the URL fix after copying .example files. Verified: socket.url=wss://ws.epicnabbo.nl in both public/ and dist/ configs. --- update-Nitrov3.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/update-Nitrov3.sh b/update-Nitrov3.sh index 66ad40c..3c15813 100755 --- a/update-Nitrov3.sh +++ b/update-Nitrov3.sh @@ -358,6 +358,38 @@ sync_configs() { ec=$((ec+1)) done ok "$ec config file(s) synced" + + info "Applying critical config URLs..." + NITRO_SRC_DIR="$NITRO_SRC_DIR" NITRO_DIST_CONFIG_DIR="$dcd" \ + NITRO_IMAGE_LIBRARY_URL="$NITRO_IMAGE_LIBRARY_URL" NITRO_HOF_FURNITURE_URL="$NITRO_HOF_FURNITURE_URL" \ + NITRO_API_URL="$NITRO_API_URL" NITRO_SOCKET_URL="$NITRO_SOCKET_URL" \ + NITRO_GAMEDATA_URL="$NITRO_GAMEDATA_URL" NITRO_ASSET_URL="$NITRO_ASSET_URL" \ + NITRO_FURNI_ASSET_ICON_URL="$NITRO_FURNI_ASSET_ICON_URL" \ + python3 -c ' +import json, os +paths = [ + os.path.join(os.environ.get("NITRO_SRC_DIR", ""), "renderer-config.json"), + os.path.join(os.environ.get("NITRO_DIST_CONFIG_DIR", ""), "renderer-config.json"), + os.path.join(os.environ.get("NITRO_SRC_DIR", ""), "ui-config.json"), + os.path.join(os.environ.get("NITRO_DIST_CONFIG_DIR", ""), "ui-config.json"), +] +for path in paths: + if not os.path.exists(path): continue + with open(path, "r") as f: data = json.load(f) + for key in ["image.library.url", "hof.furni.url", "gamedata.url", "asset.url"]: + env_val = os.environ.get(f"NITRO_{key.upper().replace(chr(46), chr(95))}") + if env_val: data[key] = env_val + for key in ["api.url", "socket.url", "furni.asset.icon.url"]: + if key in data: + env_val = os.environ.get(f"NITRO_{key.upper().replace(chr(46), chr(95))}") + if env_val: data[key] = env_val + if "gamedata.url" in data: + data["radio.url"] = data["gamedata.url"] + "/config/radio-stations.json5?t=%timestamp%" + data["soundboard.url"] = data["gamedata.url"] + "/config/soundboard-sounds.json5?t=%timestamp%" + if "show.google.ads" in data: data["show.google.ads"] = False + with open(path, "w") as f: json.dump(data, f, indent=(4 if "dist" not in path else None), separators=(",", ":") if "dist" in path else (",", ": ")) + print(f" [OK] Fixed: {os.path.basename(path)}") +' && ok "All config URLs synced" } do_cleanup() {