mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
test fix
This commit is contained in:
parent
3df580287d
commit
a2a52ac174
1 changed files with 3 additions and 1 deletions
|
@ -17,9 +17,10 @@ class Stremio : MainAPI() {
|
||||||
override var name = "Stremio"
|
override var name = "Stremio"
|
||||||
override val supportedTypes = setOf(TvType.Others)
|
override val supportedTypes = setOf(TvType.Others)
|
||||||
override val hasMainPage = true
|
override val hasMainPage = true
|
||||||
private val fixedUrl = mainUrl.fixSourceUrl()
|
private var fixedUrl = mainUrl
|
||||||
|
|
||||||
override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse? {
|
override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse? {
|
||||||
|
fixedUrl = mainUrl.fixSourceUrl()
|
||||||
val res = tryParseJson<Manifest>(app.get("${fixedUrl}/manifest.json").text) ?: return null
|
val res = tryParseJson<Manifest>(app.get("${fixedUrl}/manifest.json").text) ?: return null
|
||||||
val lists = mutableListOf<HomePageList>()
|
val lists = mutableListOf<HomePageList>()
|
||||||
res.catalogs.forEach { catalog ->
|
res.catalogs.forEach { catalog ->
|
||||||
|
@ -34,6 +35,7 @@ class Stremio : MainAPI() {
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun search(query: String): List<SearchResponse>? {
|
override suspend fun search(query: String): List<SearchResponse>? {
|
||||||
|
fixedUrl = mainUrl.fixSourceUrl()
|
||||||
val res = tryParseJson<Manifest>(app.get("${fixedUrl}/manifest.json").text) ?: return null
|
val res = tryParseJson<Manifest>(app.get("${fixedUrl}/manifest.json").text) ?: return null
|
||||||
val list = mutableListOf<SearchResponse>()
|
val list = mutableListOf<SearchResponse>()
|
||||||
res.catalogs.forEach { catalog ->
|
res.catalogs.forEach { catalog ->
|
||||||
|
|
Loading…
Reference in a new issue