spotters: logo coverage script (Wikidata logo/icon, multi-language infobox, website icon fallback), cheaper planes operator queries, refresh adds logos for new orgs
All checks were successful
Deploy production / deploy (push) Successful in 1m9s

This commit is contained in:
2026-10-25 13:54:27 +00:00
parent 7d6cee26a8
commit 5e4cd83748
8 changed files with 577 additions and 19 deletions

View File

@@ -738,10 +738,12 @@ async function main() {
const p = l?.photo;
if (m.table === 'makers')
await tx`update trains.makers set wikipedia = ${l?.article ?? null}, logo = ${p?.thumb ?? null}, logo_file = ${p?.file ?? null},
logo_license = ${p?.license ?? null}, logo_author = ${p?.author ?? null} where slug = ${m.slug}`;
logo_license = ${p?.license ?? null}, logo_author = ${p?.author ?? null} where slug = ${m.slug}
and not (${!p} and logo like '/spotters/logos/%')`;
else
await tx`update trains.operators set wikipedia = ${l?.article ?? null}, logo = ${p?.thumb ?? null}, logo_file = ${p?.file ?? null},
logo_license = ${p?.license ?? null}, logo_author = ${p?.author ?? null} where slug = ${m.slug}`;
logo_license = ${p?.license ?? null}, logo_author = ${p?.author ?? null} where slug = ${m.slug}
and not (${!p} and logo like '/spotters/logos/%')`;
}
await tx`update trains.makers k set photo = (
select t.photo from trains.types t where t.maker_id = k.id and t.photo is not null