Skip to content

Commit f0a190e

Browse files
authored
Update to bundled webUI version if necessary (#619)
In case on the startup no webUI update was available but the bundled version of the server is newer than the current used version, then the bundled version should be used. This could be the case in case a new server version was installed and no compatible webUI version is available
1 parent a2715fb commit f0a190e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

server/src/main/kotlin/suwayomi/tachidesk/server/util/WebInterfaceManager.kt

+11
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,17 @@ object WebInterfaceManager {
118118
checkForUpdate()
119119
}
120120

121+
// check if the bundled webUI version is a newer version than the current used version
122+
// this could be the case in case no compatible webUI version is available and a newer server version was installed
123+
val shouldUpdateToBundledVersion =
124+
serverConfig.webUIFlavor == DEFAULT_WEB_UI && extractVersion(getLocalVersion(applicationDirs.webUIRoot)) < extractVersion(
125+
BuildConfig.WEBUI_TAG
126+
)
127+
if (shouldUpdateToBundledVersion) {
128+
logger.debug { "Update to bundled version \"${BuildConfig.WEBUI_TAG}\"" }
129+
extractBundledWebUI()
130+
}
131+
121132
return
122133
}
123134

0 commit comments

Comments
 (0)