Fix a missing image

This commit is contained in:
Matt Isenhower 2024-11-01 12:50:25 -07:00
parent 6da1454c05
commit 04df4006e7
2 changed files with 10 additions and 0 deletions

View File

@ -12,6 +12,7 @@ const LocalizationProcessor = require('../LocalizationProcessor');
const dataPath = path.resolve('dist/data');
const splatnetAssetPath = path.resolve('dist/assets/splatnet');
const cdnAltPath = path.resolve('src/common/cdn');
class Updater {
constructor(options = {}) {
@ -184,6 +185,15 @@ class Updater {
if (fs.existsSync(localPath))
return;
// Certain images are not available on the CDN anymore
if (fs.existsSync(cdnAltPath + imagePath)) {
this.info(`Using CDN backup: ${imagePath}`);
let image = fs.readFileSync(cdnAltPath + imagePath);
this.writeFile(localPath, image);
return;
}
// Otherwise, download the image
this.info(`Downloading image: ${imagePath}`);
let splatnet = new SplatNet;

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB