mirror of
https://github.com/Suwayomi/Tachidesk.git
synced 2025-12-10 06:42:07 +01:00
Make path to local source changeable (#626)
This commit is contained in:
@@ -58,6 +58,9 @@ class ServerConfig(getConfig: () -> Config, moduleName: String = MODULE_NAME) :
|
|||||||
var backupInterval: Int by overridableConfig
|
var backupInterval: Int by overridableConfig
|
||||||
var backupTTL: Int by overridableConfig
|
var backupTTL: Int by overridableConfig
|
||||||
|
|
||||||
|
// local source
|
||||||
|
var localSourcePath: String by overridableConfig
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
fun register(getConfig: () -> Config) = ServerConfig({ getConfig().getConfig(MODULE_NAME) })
|
fun register(getConfig: () -> Config) = ServerConfig({ getConfig().getConfig(MODULE_NAME) })
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ class ApplicationDirs(
|
|||||||
val extensionsRoot = "$dataRoot/extensions"
|
val extensionsRoot = "$dataRoot/extensions"
|
||||||
val thumbnailsRoot = "$dataRoot/thumbnails"
|
val thumbnailsRoot = "$dataRoot/thumbnails"
|
||||||
val mangaDownloadsRoot = serverConfig.downloadsPath.ifBlank { "$dataRoot/downloads" }
|
val mangaDownloadsRoot = serverConfig.downloadsPath.ifBlank { "$dataRoot/downloads" }
|
||||||
val localMangaRoot = "$dataRoot/local"
|
val localMangaRoot = serverConfig.localSourcePath.ifBlank { "$dataRoot/local" }
|
||||||
val webUIRoot = "$dataRoot/webUI"
|
val webUIRoot = "$dataRoot/webUI"
|
||||||
val automatedBackupRoot = serverConfig.backupPath.ifBlank { "$dataRoot/backups" }
|
val automatedBackupRoot = serverConfig.backupPath.ifBlank { "$dataRoot/backups" }
|
||||||
|
|
||||||
|
|||||||
@@ -42,3 +42,6 @@ server.backupPath = ""
|
|||||||
server.backupTime = "00:00" # range: hour: 0-23, minute: 0-59 - default: "00:00" - time of day at which the automated backup should be triggered
|
server.backupTime = "00:00" # range: hour: 0-23, minute: 0-59 - default: "00:00" - time of day at which the automated backup should be triggered
|
||||||
server.backupInterval = 1 # time in days - 0 to disable it - range: 1 <= n < ∞ - default: 1 day - interval in which the server will automatically create a backup
|
server.backupInterval = 1 # time in days - 0 to disable it - range: 1 <= n < ∞ - default: 1 day - interval in which the server will automatically create a backup
|
||||||
server.backupTTL = 14 # time in days - 0 to disable it - range: 1 <= n < ∞ - default: 14 days - how long backup files will be kept before they will get deleted
|
server.backupTTL = 14 # time in days - 0 to disable it - range: 1 <= n < ∞ - default: 14 days - how long backup files will be kept before they will get deleted
|
||||||
|
|
||||||
|
# local source
|
||||||
|
server.localSourcePath = ""
|
||||||
|
|||||||
@@ -35,3 +35,6 @@ server.backupPath = ""
|
|||||||
server.backupTime = "00:00"
|
server.backupTime = "00:00"
|
||||||
server.backupInterval = 1
|
server.backupInterval = 1
|
||||||
server.backupTTL = 14
|
server.backupTTL = 14
|
||||||
|
|
||||||
|
# local source
|
||||||
|
server.localSourcePath = ""
|
||||||
|
|||||||
Reference in New Issue
Block a user