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
All checks were successful
Deploy production / deploy (push) Successful in 1m9s
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user