diff --git a/src/main/java/Main.java b/src/main/java/Main.java index 91064f2..4c0bac2 100644 --- a/src/main/java/Main.java +++ b/src/main/java/Main.java @@ -1,5 +1,5 @@ public class Main { - static final String futureRestoreGUIVersion = "1.98"; + static final String futureRestoreGUIVersion = "1.98.1"; static final boolean futureRestoreGUIPrerelease = false; public static void main(String[] args) { MainMenu.main(); diff --git a/src/main/java/MainMenu.java b/src/main/java/MainMenu.java index 9141b52..770b357 100644 --- a/src/main/java/MainMenu.java +++ b/src/main/java/MainMenu.java @@ -973,19 +973,32 @@ Map getLatestFrBetaDownload(String operatingSystem, String archi for (Map artifact : artifacts) { String assetName = ((String) artifact.get("name")); // Look for our OS and release binary - if (assetName.toLowerCase().contains(operatingSystem) - && assetName.toLowerCase().contains("release")) { - // If we're mac, match architecture as well - if (assetName.toLowerCase().contains("mac")) { - if (assetName.toLowerCase().contains(architecture)) { + String lcAssetName = assetName.toLowerCase(); + if (lcAssetName.contains(operatingSystem) && lcAssetName.contains("release")) { + // If we're Mac + if (lcAssetName.contains("mac")) { + // If the asset has an architecture in it + if (lcAssetName.contains("x86_64") || lcAssetName.contains("arm64")) { + // Match it with ours + if (lcAssetName.contains(architecture)) { + linkNameMap.put("link", (String) artifact.get("archive_download_url")); + linkNameMap.put("name", assetName); + return linkNameMap; + } + } + // Otherwise, don't worry about matching architecture + else { linkNameMap.put("link", (String) artifact.get("archive_download_url")); linkNameMap.put("name", assetName); + return linkNameMap; } - } else { + } + // Not Mac + else { linkNameMap.put("link", (String) artifact.get("archive_download_url")); linkNameMap.put("name", assetName); + return linkNameMap; } - return linkNameMap; } }