Feature/support different webui flavors (#863)

* Run functions for specific webui flavor

* Set default flavor of WebUIFlavor enum

* Consider flavor of served webUI when checking for update

In case the flavor was changed and the served webui files are still for the previous flavor, the update check could incorrectly detect no update

* Skip validation during initial setup

In case initial setup is triggered because of an invalid local webUI, doing a validation again is unnecessary

* Handle changed flavor on startup
This commit is contained in:
schroda
2024-02-17 17:23:01 +01:00
committed by GitHub
parent 8aa75be0d3
commit 9edbc7f1d7
3 changed files with 139 additions and 66 deletions

View File

@@ -8,6 +8,7 @@ import suwayomi.tachidesk.server.JavalinSetup.future
import suwayomi.tachidesk.server.generated.BuildConfig
import suwayomi.tachidesk.server.serverConfig
import suwayomi.tachidesk.server.util.WebInterfaceManager
import suwayomi.tachidesk.server.util.WebUIFlavor
import java.util.concurrent.CompletableFuture
class InfoQuery {
@@ -60,7 +61,7 @@ class InfoQuery {
fun checkForWebUIUpdate(): CompletableFuture<WebUIUpdateCheck> {
return future {
val (version, updateAvailable) = WebInterfaceManager.isUpdateAvailable(raiseError = true)
val (version, updateAvailable) = WebInterfaceManager.isUpdateAvailable(WebUIFlavor.current, raiseError = true)
WebUIUpdateCheck(
channel = serverConfig.webUIChannel.value,
tag = version,