feat: add default furni icon repair sources
CI / check (push) Successful in 26s
CI / release (push) Skipped
CI / deploy (push) Successful in 1m1s

Fall back to well-known public furni icon hosts (HabboAssets, Hubbly,
Leet) when no clone sources are configured, so Repair Icons can download
missing icons out of the box. Also handle variant classnames (base name
and '*' replaced with '_') and extract icons from remote .nitro bundles.
Send a browser User-Agent on downloads to avoid being blocked by hotels.
This commit is contained in:
openhands committed 2026-08-02 16:44:24 +02:00
1 parent bac2f653af
commit 1f9e8a0eec
3 files changed
+99 -9

No files matched your search

+8 -1
View File
@@ -29,7 +29,14 @@ export async function downloadFile(
if (attempt > 0) {
await new Promise((r) => setTimeout(r, baseDelay * 2 ** (attempt - 1)));
}
const res = await fetch(url, { signal: AbortSignal.timeout(15000) });
const res = await fetch(url, {
signal: AbortSignal.timeout(15000),
headers: {
"User-Agent":
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0 Safari/537.36",
Accept: "image/png,image/*,*/*;q=0.8",
},
});
if (!res.ok) {
const deterministic =
res.status === 404 || res.status === 410 || res.status === 403;