From df093d5e720b732eb9dca75ec9d835054cb71186 Mon Sep 17 00:00:00 2001 From: Cloudburst Date: Mon, 16 Aug 2021 16:54:58 +0200 Subject: [PATCH] filter out prereleases from updater --- .../java/com/lagradost/cloudstream3/utils/InAppUpdater.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/utils/InAppUpdater.kt b/app/src/main/java/com/lagradost/cloudstream3/utils/InAppUpdater.kt index cc70366b..98544376 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/utils/InAppUpdater.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/utils/InAppUpdater.kt @@ -38,6 +38,7 @@ class InAppUpdater { @JsonProperty("body") val body: String, // Desc @JsonProperty("assets") val assets: List, @JsonProperty("target_commitish") val target_commitish: String, // branch + @JsonProperty("prerelease") var prerelease: Boolean, ) data class Update( @@ -67,7 +68,9 @@ class InAppUpdater { versionRegex.find(it.name)?.groupValues?.get(2) }).toList().lastOrNull()*/ val found = - response.sortedWith(compareBy { release -> + response.filter({ rel -> + !rel.prerelease + }).sortedWith(compareBy { release -> release.assets.filter { it.content_type == "application/vnd.android.package-archive" } .getOrNull(0)?.name?.let { it1 -> versionRegex.find(