From a2a52ac1747ae2f16440b29d5ab8545df341129a Mon Sep 17 00:00:00 2001 From: hexated Date: Sun, 2 Apr 2023 03:36:49 +0700 Subject: [PATCH] test fix --- StremioX/src/main/kotlin/com/hexated/Stremio.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/StremioX/src/main/kotlin/com/hexated/Stremio.kt b/StremioX/src/main/kotlin/com/hexated/Stremio.kt index 2fb7b2f5..91bbd216 100644 --- a/StremioX/src/main/kotlin/com/hexated/Stremio.kt +++ b/StremioX/src/main/kotlin/com/hexated/Stremio.kt @@ -17,9 +17,10 @@ class Stremio : MainAPI() { override var name = "Stremio" override val supportedTypes = setOf(TvType.Others) override val hasMainPage = true - private val fixedUrl = mainUrl.fixSourceUrl() + private var fixedUrl = mainUrl override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse? { + fixedUrl = mainUrl.fixSourceUrl() val res = tryParseJson(app.get("${fixedUrl}/manifest.json").text) ?: return null val lists = mutableListOf() res.catalogs.forEach { catalog -> @@ -34,6 +35,7 @@ class Stremio : MainAPI() { } override suspend fun search(query: String): List? { + fixedUrl = mainUrl.fixSourceUrl() val res = tryParseJson(app.get("${fixedUrl}/manifest.json").text) ?: return null val list = mutableListOf() res.catalogs.forEach { catalog ->