launcher now checks if there is an update before downloading it

This commit is contained in:
ryannathans 2022-04-26 19:03:48 +10:00
parent a6e855a740
commit 99c798daad
3 changed files with 9 additions and 27 deletions

View file

@ -19,7 +19,7 @@ object Updater {
val fileUri = File(Settings.SAVE_DIR + File.separator + Settings.SAVE_NAME).toURI()
status = UpdateStatus.CHECKING
localMD5 = Checksum.getLocalChecksum(fileUri)
remoteMD5 = Checksum.getRemoteChecksum(Settings.DOWNLOAD_URL) ?: "-1"
remoteMD5 = Checksum.getRemoteChecksum(Settings.DOWNLOAD_MD5_URL, checksumFile = true) ?: "-1"
println("Local: $localMD5 || Remote: $remoteMD5")
status = UpdateStatus.COMPLETE
}