mirror of
https://github.com/misenhower/splatoon2.ink.git
synced 2026-03-21 17:24:37 -05:00
Fix a missing image
This commit is contained in:
parent
6da1454c05
commit
04df4006e7
|
|
@ -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 |
Loading…
Reference in New Issue
Block a user