asset cacher fix to handle very broken worlds

This commit is contained in:
Natsumi
2021-06-26 07:01:11 +12:00
parent c302ebfd4c
commit ce62f9992d

View File

@@ -9133,6 +9133,8 @@ speechSynthesis.getVoices();
break; break;
} }
} }
}).catch((err) => {
D.fileSize = 'Error';
}); });
} }
} }
@@ -9492,6 +9494,8 @@ speechSynthesis.getVoices();
break; break;
} }
} }
}).catch((err) => {
D.fileSize = 'Error';
}); });
} }
} }
@@ -9568,6 +9572,8 @@ speechSynthesis.getVoices();
break; break;
} }
} }
}).catch((err) => {
D.fileSize = 'Error';
}); });
} }
} }
@@ -12453,13 +12459,24 @@ speechSynthesis.getVoices();
var fileVersion = extractFileVersion(assetUrl); var fileVersion = extractFileVersion(assetUrl);
if (!fileId) { if (!fileId) {
this.downloadCurrent.status = 'Invalid asset url'; this.downloadCurrent.status = 'Invalid asset url';
this.downloadCurrent.date = Date.now();
this.downloadHistoryTable.data.unshift(this.downloadCurrent);
this.downloadCurrent = {};
this.downloadInProgress = false;
this.downloadVRChatCache();
return;
}
try {
var args = await API.getBundles(fileId);
} catch (err) {
this.downloadCurrent.status = 'API request failed';
this.downloadCurrent.date = Date.now();
this.downloadHistoryTable.data.unshift(this.downloadCurrent); this.downloadHistoryTable.data.unshift(this.downloadCurrent);
this.downloadCurrent = {}; this.downloadCurrent = {};
this.downloadInProgress = false; this.downloadInProgress = false;
this.downloadVRChatCache(); this.downloadVRChatCache();
return; return;
} }
var args = await API.getBundles(fileId);
var { versions } = args.json; var { versions } = args.json;
var file = ''; var file = '';
for (var i = versions.length - 1; i > -1; i--) { for (var i = versions.length - 1; i > -1; i--) {
@@ -12471,6 +12488,7 @@ speechSynthesis.getVoices();
} }
if (!file) { if (!file) {
this.downloadCurrent.status = 'Missing asset version'; this.downloadCurrent.status = 'Missing asset version';
this.downloadCurrent.date = Date.now();
this.downloadHistoryTable.data.unshift(this.downloadCurrent); this.downloadHistoryTable.data.unshift(this.downloadCurrent);
this.downloadCurrent = {}; this.downloadCurrent = {};
this.downloadInProgress = false; this.downloadInProgress = false;