fixed sora detail & reduce loklok load in home

This commit is contained in:
hexated 2022-10-28 19:09:11 +07:00
parent bb3f40ab1a
commit 7dd469be03
4 changed files with 5 additions and 5 deletions

View file

@ -1,5 +1,5 @@
// use an integer for version numbers
version = 8
version = 9
cloudstream {

View file

@ -47,8 +47,8 @@ class Loklok : MainAPI() {
override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse {
val home = ArrayList<HomePageList>()
for (i in 0..8) {
delay(500)
for (i in 0..6) {
// delay(500)
app.get("$apiUrl/homePage/getHome?page=$i", headers = headers)
.parsedSafe<Home>()?.data?.recommendItems
?.filterNot { it.homeSectionType == "BLOCK_GROUP" }

View file

@ -1,5 +1,5 @@
// use an integer for version numbers
version = 13
version = 14
cloudstream {

View file

@ -208,7 +208,7 @@ open class SoraStream : TmdbProvider() {
val recommendations =
responses.recommandations?.mapNotNull { media -> media.toSearchResponse() }
val trailer = responses.result.videos?.results?.map { "https://www.youtube.com/watch?v=${it.key}" }?.random()
val trailer = responses.result.videos?.results?.map { "https://www.youtube.com/watch?v=${it.key}" }?.randomOrNull()
return if (type == TvType.TvSeries) {
val episodes = mutableListOf<Episode>()