MatterLink actually works now, no promises though

This commit is contained in:
NikkyAI 2018-02-19 20:31:02 +01:00
parent 846ebecc44
commit 83d7028280
2 changed files with 4 additions and 3 deletions

View File

@ -6,7 +6,8 @@ data class CurseFile(
val downloadURL: String, val downloadURL: String,
val fileName: String, val fileName: String,
val gameVersion: List<String>, val gameVersion: List<String>,
val releaseType: String val releaseType: String,
val fileStatus: String
) { ) {
companion object { companion object {
val gson = Gson() val gson = Gson()

View File

@ -44,7 +44,7 @@ class UpdateChecker : Runnable {
gson.fromJson(content, Array<CurseFile>::class.java) gson.fromJson(content, Array<CurseFile>::class.java)
.filter { .filter {
it.gameVersion.contains(instance.mcVersion) it.fileStatus == "semiNormal" && it.gameVersion.contains(instance.mcVersion)
} }
.sortedByDescending { it.fileName.substringAfterLast(" ") } .sortedByDescending { it.fileName.substringAfterLast(" ") }
@ -70,7 +70,7 @@ class UpdateChecker : Runnable {
if (!bigger) { if (!bigger) {
val currentChunk = modVersionChunks.getOrNull(index) ?: 0 val currentChunk = modVersionChunks.getOrNull(index) ?: 0
instance.debug("$chunk > $currentChunk") instance.debug("$chunk > $currentChunk")
if(chunk < currentChunk) if (chunk < currentChunk)
return@forEach return@forEach
bigger = chunk > currentChunk bigger = chunk > currentChunk