feat: add default furni icon repair sources
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user