reconsider package strings

This commit is contained in:
Aria Moradi 2021-05-27 02:13:17 +04:30
parent 155f9f107d
commit dda5a2df93
5 changed files with 6 additions and 6 deletions

View File

@ -12,7 +12,7 @@ import net.harawata.appdirs.AppDirsFactory
val ApplicationRootDir: String
get(): String {
return System.getProperty(
"suwayomi.tachidesk.rootDir",
"suwayomi.server.rootDir",
AppDirsFactory.getInstance().getUserDataDir("Tachidesk", null, null)
)
}

View File

@ -17,4 +17,4 @@ fun setLogLevel(level: Level) {
}
fun debugLogsEnabled(config: Config)
= System.getProperty("suwayomi.tachidesk.debugLogsEnabled", config.getString("server.debugLogsEnabled")).toBoolean()
= System.getProperty("suwayomi.server.debugLogsEnabled", config.getString("server.debugLogsEnabled")).toBoolean()

View File

@ -1 +1 @@
jre\bin\java -Dsuwayomi.tachidesk.debugLogsEnabled=true -jar Tachidesk.jar
jre\bin\java -Dsuwayomi.server.debugLogsEnabled=true -jar Tachidesk.jar

View File

@ -1 +1 @@
jre\bin\javaw "-Dsuwayomi.tachidesk.webInterface=electron" "-Dsuwayomi.tachidesk.electronPath=electron/electron.exe" -jar Tachidesk.jar
jre\bin\javaw "-Dsuwayomi.server.webInterface=electron" "-Dsuwayomi.server.electronPath=electron/electron.exe" -jar Tachidesk.jar

View File

@ -18,11 +18,11 @@ object Browser {
fun openInBrowser() {
val openInElectron = System.getProperty("suwayomi.tachidesk.webInterface")?.equals("electron")
val openInElectron = System.getProperty("suwayomi.server.webInterface")?.equals("electron")
if (openInElectron == true) {
try {
val electronPath = System.getProperty("suwayomi.tachidesk.electronPath")!!
val electronPath = System.getProperty("suwayomi.server.electronPath")!!
electronInstances.add(ProcessBuilder(electronPath, appBaseUrl).start())
} catch (e: Throwable) { // cover both java.lang.Exception and java.lang.Error
e.printStackTrace()