From 34c52ffb9ff357b81a384f50937f82cb7b696395 Mon Sep 17 00:00:00 2001 From: ztimson Date: Sat, 27 Jun 2026 17:28:53 -0400 Subject: [PATCH] ADSB backfill fix? --- server/src/adsb.mjs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/server/src/adsb.mjs b/server/src/adsb.mjs index 800b061..f47ea28 100644 --- a/server/src/adsb.mjs +++ b/server/src/adsb.mjs @@ -200,11 +200,11 @@ async function scrapeHexDatabase(icao) { const cells = row.find('td'); return { - country: $(cells[1]).text().trim() || null, - registration: $(cells[2]).text().trim() || null, - aircraft: $(cells[3]).text().trim() || null, - operator: $(cells[4]).text().trim() || null, - serialNumber: $(cells[6]).text().trim() || null, + country: $(cells[0]).text().trim() || null, + registration: $(cells[1]).text().trim() || null, + aircraft: $(cells[2]).text().trim() || null, + operator: $(cells[3]).text().trim() || null, + serialNumber: $(cells[5]).text().trim() || null, }; } @@ -242,11 +242,8 @@ export async function enrichAircraft(a) { let found = await hexDbPromise; if(!found) found = await scrapePromise; if(!found) { - console.log(`not found: ${icao}`) noRecord.push(icao); return { icao, ...a, type: 'unknown' }; - } else { - console.log(`found: ${icao}`) } // 3. Backfill manufacturer/model/engines from similar aircraft type in DB