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 ->