re-order config options

This commit is contained in:
Aria Moradi
2023-02-12 22:50:06 +03:30
parent 555f73b478
commit f3c2ee4c40
3 changed files with 12 additions and 15 deletions
@@ -56,8 +56,6 @@ fun getChapterCachePath(mangaId: Int, chapterId: Int): String {
return applicationDirs.tempMangaCacheRoot + "/" + getChapterDir(mangaId, chapterId)
}
// (if (useTempCache) applicationDirs.tempCacheRoot else )
/** return value says if rename/move was successful */
fun updateMangaDownloadDir(mangaId: Int, newTitle: String): Boolean {
val mangaEntry = getMangaEntry(mangaId)
@@ -19,18 +19,9 @@ class ServerConfig(config: Config, moduleName: String = MODULE_NAME) : SystemPro
// proxy
val socksProxyEnabled: Boolean by overridableConfig
val socksProxyHost: String by overridableConfig
val socksProxyPort: String by overridableConfig
// downloader
val downloadAsCbz: Boolean by overridableConfig
// misc
val debugLogsEnabled: Boolean = debugLogsEnabled(GlobalConfigManager.config)
val systemTrayEnabled: Boolean by overridableConfig
val downloadsPath: String by overridableConfig
// webUI
val webUIEnabled: Boolean by overridableConfig
val webUIFlavor: String by overridableConfig
@@ -38,11 +29,19 @@ class ServerConfig(config: Config, moduleName: String = MODULE_NAME) : SystemPro
val webUIInterface: String by overridableConfig
val electronPath: String by overridableConfig
// downloader
val downloadAsCbz: Boolean by overridableConfig
val downloadsPath: String by overridableConfig
// Authentication
val basicAuthEnabled: Boolean by overridableConfig
val basicAuthUsername: String by overridableConfig
val basicAuthPassword: String by overridableConfig
// misc
val debugLogsEnabled: Boolean = debugLogsEnabled(GlobalConfigManager.config)
val systemTrayEnabled: Boolean by overridableConfig
companion object {
fun register(config: Config) = ServerConfig(config.getConfig(MODULE_NAME))
}
@@ -14,15 +14,15 @@ server.initialOpenInBrowserEnabled = true
server.webUIInterface = "browser" # "browser" or "electron"
server.electronPath = ""
# downloader
server.downloadAsCbz = false
server.downloadsPath = ""
# Authentication
server.basicAuthEnabled = false
server.basicAuthUsername = ""
server.basicAuthPassword = ""
# downloader
server.downloadAsCbz = false
# misc
server.debugLogsEnabled = false
server.systemTrayEnabled = true
server.downloadsPath = ""