From ca0d0d52f50d6d0f2db2c548c330b64af165a4d4 Mon Sep 17 00:00:00 2001 From: dlawler489 <104159223@student.swin.edu.au> Date: Mon, 21 Sep 2026 10:48:45 +1000 Subject: [PATCH] Fix a watch check stopping after one model withFiles was declared inside the try block but read by the wait after it, so every check threw ReferenceError once it had imported a single model. Co-Authored-By: Claude Opus 5 --- lib/collectionWatch.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/collectionWatch.js b/lib/collectionWatch.js index 853d366..15d35c9 100644 --- a/lib/collectionWatch.js +++ b/lib/collectionWatch.js @@ -184,10 +184,11 @@ async function importFound(watch, collection) { const { rows: [live] } = await db.query('SELECT enabled FROM watched_collections WHERE id = $1', [watch.id]); if (!live || !live.enabled) break; const url = makerworld.designUrl(design); + // While MakerWorld is waiting for you to prove you're not a robot, the + // check still brings in the models — their files wait for you. Decided out + // here because the wait after each import depends on it. + const withFiles = Boolean(watch.fetch_files) && !downloadBlock.isBlocked('makerworld'); try { - // While MakerWorld is waiting for you to prove you're not a robot, the - // check still brings in the models — their files wait for you. - const withFiles = Boolean(watch.fetch_files) && !downloadBlock.isBlocked('makerworld'); const result = await deps.importFromUrl(url, { projects: watch.project_id ? [watch.project_id] : [], withFiles, // off by default: MakerWorld refuses quick bursts