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:
1 parent
bac2f653af
commit
1f9e8a0eec
3 files changed
+99
-9
No files matched your search
@@ -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