From 6934d344f08875f0fe47107d3aa9f4eb81b0aa6b Mon Sep 17 00:00:00 2001 From: Aria Moradi Date: Tue, 25 Apr 2023 10:57:54 +0330 Subject: [PATCH] better paths --- .../interceptor/CloudflareInterceptor.kt | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/server/src/main/kotlin/eu/kanade/tachiyomi/network/interceptor/CloudflareInterceptor.kt b/server/src/main/kotlin/eu/kanade/tachiyomi/network/interceptor/CloudflareInterceptor.kt index 6174952d1..7672c8cb9 100644 --- a/server/src/main/kotlin/eu/kanade/tachiyomi/network/interceptor/CloudflareInterceptor.kt +++ b/server/src/main/kotlin/eu/kanade/tachiyomi/network/interceptor/CloudflareInterceptor.kt @@ -317,18 +317,18 @@ private constructor(private val process: Process, val chromedriverPath: String) } fun create(): PythonInterpreter { - val uc = serverConfig.undetectedChromePath + val uc = File(serverConfig.undetectedChromePath).absolutePath - val pythonPath = if (System.getProperty("os.name").startsWith("Windows")) { - "$uc\\venv\\Scripts\\python.exe" + val (pythonPath, chromedriverPath) = if (System.getProperty("os.name").startsWith("Windows")) { + arrayOf( + "$uc\\venv\\Scripts\\python.exe", + "$uc\\chromedriver.exe" + ) } else { - "$uc/venv/bin/python" - } - - val chromedriverPath = if (System.getProperty("os.name").startsWith("Windows")) { - "$uc\\chromedriver.exe" - } else { - "$uc/chromedriver" + arrayOf( + "$uc/venv/bin/python", + "$uc/chromedriver" + ) } return create(