diff --git a/nginx.conf b/nginx.conf index e4fc931..14c1dee 100755 --- a/nginx.conf +++ b/nginx.conf @@ -113,12 +113,12 @@ server { try_files $uri =404; } - # Gamedata / Habbo assets (symlinked) + # Gamedata / Habbo assets location /gamedata/ { + alias /var/www/Gamedata/config/; expires 7d; add_header Cache-Control "public"; access_log off; - try_files $uri =404; } # Storage files (avatars, badges, photos) diff --git a/public/ads.txt b/public/ads.txt new file mode 100644 index 0000000..e69de29 diff --git a/public/gamedata b/public/gamedata new file mode 120000 index 0000000..eef8211 --- /dev/null +++ b/public/gamedata @@ -0,0 +1 @@ +/var/www/Gamedata/config \ No newline at end of file diff --git a/update-Nitrov3.sh b/update-Nitrov3.sh index e90066c..c18e80e 100755 --- a/update-Nitrov3.sh +++ b/update-Nitrov3.sh @@ -141,6 +141,15 @@ yarn install echo "--> Building Nitro-V3 with Vite 8 / Yarn..." yarn build +echo "--> Ensuring custom-themes/index.json exists..." +mkdir -p "$NITRO_CLIENT/dist/custom-themes" +if [ ! -f "$NITRO_CLIENT/dist/custom-themes/index.json" ]; then + echo '{"themes":[]}' > "$NITRO_CLIENT/dist/custom-themes/index.json" + echo "--> [OK] Created custom-themes/index.json" +else + echo "--> [OK] custom-themes/index.json already exists" +fi + # ---------------------------------------- # 4. Sync Configs & UITexts (.example logica) @@ -209,6 +218,8 @@ import json, sys, 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: @@ -225,6 +236,13 @@ for path in paths: env_val = os.environ.get(f'NITRO_{key.upper().replace(".", "_")}') if env_val: data[key] = env_val + # Forceer /config/ pad voor radio en soundboard + 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%' + # Zet Google Ads uit + 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] Hersteld: {os.path.basename(path)}')