forked from MapComplete/MapComplete
Chore: update NSI
This commit is contained in:
parent
e1c36b3785
commit
7d72e26746
231 changed files with 10 additions and 6 deletions
|
@ -104,11 +104,12 @@ class NsiLogos extends Script {
|
|||
const basePath = "./public/assets/data/nsi/logos/"
|
||||
let downloadCount = 0
|
||||
let errored = 0
|
||||
let skipped = 0
|
||||
const alreadyDownloaded = NsiLogos.downloadedFiles()
|
||||
const stepcount = 50
|
||||
for (let i = 0; i < items.length; i += stepcount) {
|
||||
if (downloadCount > 0 || i % 200 === 0) {
|
||||
console.log(i + "/" + items.length, "downloaded " + downloadCount + " for NSI type " + type)
|
||||
console.log(i + "/" + items.length, `downloaded ${downloadCount}; failed ${errored}; skipped ${skipped} for NSI type ${type}`)
|
||||
}
|
||||
|
||||
const results = await Promise.all(
|
||||
|
@ -121,6 +122,9 @@ class NsiLogos extends Script {
|
|||
if (didDownload === true) {
|
||||
downloadCount++
|
||||
}
|
||||
if (didDownload === false) {
|
||||
skipped++
|
||||
}
|
||||
if (didDownload !== "error") {
|
||||
continue
|
||||
}
|
||||
|
@ -262,7 +266,7 @@ class NsiLogos extends Script {
|
|||
const id = match[1]
|
||||
if (!ids.has(id)) {
|
||||
console.log("Obsolete file:", f, id)
|
||||
// unlinkSync(f)
|
||||
unlinkSync(f)
|
||||
pruned++
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue