mirror of
https://gitlab.com/mangadex-pub/mangadex_at_home.git
synced 2024-11-17 00:22:32 +01:00
Update settings beforehand
This commit is contained in:
parent
b1ed017bfd
commit
12ac127569
@ -170,6 +170,7 @@ class MangaDexClient(private val settingsFile: File, databaseFile: File, cacheFo
|
||||
LOGGER.info { "Client settings unchanged" }
|
||||
return
|
||||
}
|
||||
settings = newSettings
|
||||
LOGGER.info { "New settings loaded: $newSettings" }
|
||||
|
||||
storage.maxSize = (newSettings.maxCacheSizeInMebibytes * 1024 * 1024 * 0.95).toLong()
|
||||
@ -177,7 +178,6 @@ class MangaDexClient(private val settingsFile: File, databaseFile: File, cacheFo
|
||||
stopImageServer()
|
||||
startImageServer()
|
||||
|
||||
settings = newSettings
|
||||
} catch (e: UnrecognizedPropertyException) {
|
||||
LOGGER.warn { "Settings file is invalid: '$e.propertyName' is not a valid setting" }
|
||||
} catch (e: JsonProcessingException) {
|
||||
|
Loading…
Reference in New Issue
Block a user