mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-04 11:24:35 -05:00
better paths
This commit is contained in:
@@ -317,18 +317,18 @@ private constructor(private val process: Process, val chromedriverPath: String)
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun create(): PythonInterpreter {
|
fun create(): PythonInterpreter {
|
||||||
val uc = serverConfig.undetectedChromePath
|
val uc = File(serverConfig.undetectedChromePath).absolutePath
|
||||||
|
|
||||||
val pythonPath = if (System.getProperty("os.name").startsWith("Windows")) {
|
val (pythonPath, chromedriverPath) = if (System.getProperty("os.name").startsWith("Windows")) {
|
||||||
"$uc\\venv\\Scripts\\python.exe"
|
arrayOf(
|
||||||
} else {
|
"$uc\\venv\\Scripts\\python.exe",
|
||||||
"$uc/venv/bin/python"
|
|
||||||
}
|
|
||||||
|
|
||||||
val chromedriverPath = if (System.getProperty("os.name").startsWith("Windows")) {
|
|
||||||
"$uc\\chromedriver.exe"
|
"$uc\\chromedriver.exe"
|
||||||
|
)
|
||||||
} else {
|
} else {
|
||||||
|
arrayOf(
|
||||||
|
"$uc/venv/bin/python",
|
||||||
"$uc/chromedriver"
|
"$uc/chromedriver"
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
return create(
|
return create(
|
||||||
|
|||||||
Reference in New Issue
Block a user