mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-06-30 09:24:34 -05:00
Handle serving non-default webui with "bundled" channel (#1924)
Channel "bundled" only works with the default webui. So force change the flavor and log a warning for information
This commit is contained in:
@@ -304,11 +304,25 @@ object WebInterfaceManager {
|
||||
return
|
||||
}
|
||||
|
||||
val flavor = WebUIFlavor.current
|
||||
val servedFlavor = getServedWebUIFlavor()
|
||||
|
||||
val log =
|
||||
KotlinLogging.logger("${logger.name} setupWebUI(flavor= ${flavor.uiName}, servedFlavor= ${servedFlavor.uiName})")
|
||||
KotlinLogging.logger(
|
||||
"${logger.name} setupWebUI(flavor= ${WebUIFlavor.current.uiName}, servedFlavor= ${servedFlavor.uiName}, channel= ${serverConfig.webUIChannel})",
|
||||
)
|
||||
|
||||
val flavor =
|
||||
if (serverConfig.webUIChannel.value == WebUIChannel.BUNDLED) {
|
||||
if (serverConfig.webUIFlavor.value != WebUIFlavor.default) {
|
||||
log.warn {
|
||||
"Changed flavor to ${WebUIFlavor.default.uiName}. Channel \"${WebUIChannel.BUNDLED}\" only works with the default flavor"
|
||||
}
|
||||
}
|
||||
|
||||
WebUIFlavor.default
|
||||
} else {
|
||||
WebUIFlavor.current
|
||||
}
|
||||
|
||||
if (doesLocalWebUIExist(applicationDirs.webUIRoot)) {
|
||||
val currentVersion = getLocalVersion()
|
||||
|
||||
Reference in New Issue
Block a user