Update StremioC.kt

This commit is contained in:
Hexated 2023-04-04 15:38:01 +07:00 committed by GitHub
parent 11e96c840a
commit 0df47135ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -28,7 +28,7 @@ class StremioC : MainAPI() {
mainUrl = mainUrl.fixSourceUrl() mainUrl = mainUrl.fixSourceUrl()
val res = tryParseJson<Manifest>(app.get("${mainUrl}/manifest.json").text) ?: return null val res = tryParseJson<Manifest>(app.get("${mainUrl}/manifest.json").text) ?: return null
val lists = mutableListOf<HomePageList>() val lists = mutableListOf<HomePageList>()
res.catalogs.forEach { catalog -> res.catalogs.apmap { catalog ->
catalog.toHomePageList(this)?.let { catalog.toHomePageList(this)?.let {
if (it.list.isNotEmpty()) lists.add(it) if (it.list.isNotEmpty()) lists.add(it)
} }
@ -362,4 +362,4 @@ class StremioC : MainAPI() {
} }
} }
} }
} }