mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
stremiox: fix duplicate in search
This commit is contained in:
parent
2227e4520a
commit
0165d0a031
2 changed files with 4 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 6
|
version = 7
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
|
|
|
@ -43,10 +43,10 @@ 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 list = mutableListOf<SearchResponse>()
|
val list = mutableListOf<SearchResponse>()
|
||||||
res.catalogs.forEach { catalog ->
|
res.catalogs.apmap { catalog ->
|
||||||
list.addAll(catalog.search(query, this))
|
list.addAll(catalog.search(query, this))
|
||||||
}
|
}
|
||||||
return list
|
return list.distinct()
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun load(url: String): LoadResponse? {
|
override suspend fun load(url: String): LoadResponse? {
|
||||||
|
@ -160,7 +160,7 @@ class StremioC : MainAPI() {
|
||||||
entries.add(entry.toSearchResponse(provider))
|
entries.add(entry.toSearchResponse(provider))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return entries.distinctBy { it.id }
|
return entries
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun toHomePageList(provider: StremioC): HomePageList? {
|
suspend fun toHomePageList(provider: StremioC): HomePageList? {
|
||||||
|
|
Loading…
Reference in a new issue