Backfill missing nitros into the Gamedata bundle on import
CI / check (push) Successful in 43s
CI / release (push) Skipped
CI / deploy (push) Failing after 1m19s

After each single import, batch import and batch-regen, copy every
.nitro file that is missing from /var/www/Gamedata/bundled/furniture so
the emulator can render all imported furniture even when the mirror write
was skipped. Reports the copied files in the API/SSE response.
This commit is contained in:
openhands committed 2026-08-18 20:29:30 +02:00
1 parent 99e77d9872
commit bcd24bfca4
4 files changed
+77 -1

No files matched your search

+9
View File
@@ -22,6 +22,7 @@ import {
importSingleFurni,
reconcileImportedOfferIds,
resetCatalogPageCache,
syncNitrosToGamedataBundle,
} from "@/lib/services/furni-import";
import { getOfficialHabboFurnidata } from "@/lib/services/habbo-furnidata-cache";
import { listFurniture } from "@/lib/services/habbofurni";
@@ -411,6 +412,9 @@ export const POST = withAdmin(
// Keep asset + furnidata folders readable by the web server
const ownership = await ensureFurniOwnership();
// Backfill any missing nitros into the emulator's Gamedata bundle
const nitrosSynced = await syncNitrosToGamedataBundle();
const succeeded = results.filter((r) => r.ok).length;
const failed = results.filter((r) => !r.ok).length;
@@ -421,6 +425,7 @@ export const POST = withAdmin(
results,
offerIdsFixed: reconciled.fixed,
ownershipFixed: ownership.fixed,
nitrosSynced: nitrosSynced.copied,
});
}
@@ -476,6 +481,9 @@ export const POST = withAdmin(
// Keep asset + furnidata folders readable by the web server
const ownership = await ensureFurniOwnership();
// Backfill any missing nitros into the emulator's Gamedata bundle
const nitrosSynced = await syncNitrosToGamedataBundle();
logAudit({
userId: ctx.session.user.id,
action: "furni_import",
@@ -498,6 +506,7 @@ export const POST = withAdmin(
catalogItemId: result.catalogItemId,
offerIdsFixed: reconciled.fixed,
ownershipFixed: ownership.fixed,
nitrosSynced: nitrosSynced.copied,
spriteCount: result.spriteCount,
warnings: result.warnings,
});