Compare commits

..

3 Commits

Author SHA1 Message Date
FinnHornhoover
aa7086aa68
Merge fe6f42f67c into ec0fc87dcd 2023-11-17 21:50:21 +00:00
FinnHornhoover
fe6f42f67c cleaned up and added docstrings to cache handler 2023-11-18 00:48:51 +03:00
FinnHornhoover
c3dc79b42a fixed added versions not showing up immediately 2023-11-18 00:47:23 +03:00
3 changed files with 655 additions and 102 deletions

View File

@ -331,6 +331,10 @@ function validateCacheLocation() {
function loadGameVersions() { function loadGameVersions() {
var versionJson = remotefs.readJsonSync(versionsPath); var versionJson = remotefs.readJsonSync(versionsPath);
versionArray = versionJson["versions"]; versionArray = versionJson["versions"];
$("#addserver-versionselect").empty();
$("#editserver-versionselect").empty();
$.each(versionArray, function (key, value) { $.each(versionArray, function (key, value) {
$(new Option(value.name, "val")).appendTo("#addserver-versionselect"); $(new Option(value.name, "val")).appendTo("#addserver-versionselect");
$(new Option(value.name, "val")).appendTo("#editserver-versionselect"); $(new Option(value.name, "val")).appendTo("#editserver-versionselect");
@ -384,8 +388,8 @@ function loadServerList() {
} }
function loadCacheList() { function loadCacheList() {
var versionjson = remotefs.readJsonSync(versionsPath); // we might want to use a new version right away, so reload them
versionArray = versionjson["versions"]; loadGameVersions();
if (!defaultHashes) { if (!defaultHashes) {
defaultHashes = remotefs.readJsonSync(path.join( defaultHashes = remotefs.readJsonSync(path.join(

File diff suppressed because it is too large Load Diff

BIN
lib/cache_handler.exe vendored

Binary file not shown.