From 518a02b8f0307b77f89f831ce8e0ce0394dfae82 Mon Sep 17 00:00:00 2001 From: Clyzer Date: Mon, 12 Dec 2022 14:09:55 -0300 Subject: [PATCH] searching errors... --- .../src/main/kotlin/com/lagradost/MundoDonghuaProvider.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/MundoDonghuaProvider/src/main/kotlin/com/lagradost/MundoDonghuaProvider.kt b/MundoDonghuaProvider/src/main/kotlin/com/lagradost/MundoDonghuaProvider.kt index c129ecc..18a85f6 100644 --- a/MundoDonghuaProvider/src/main/kotlin/com/lagradost/MundoDonghuaProvider.kt +++ b/MundoDonghuaProvider/src/main/kotlin/com/lagradost/MundoDonghuaProvider.kt @@ -92,8 +92,8 @@ class MundoDonghuaProvider : MainAPI() { } override suspend fun load(url: String): LoadResponse { - val doc = app.get(url, timeout = 120).document val doc2 = app.get(mainUrl, timeout = 120).document + val doc = app.get(url, timeout = 120).document val poster = doc.selectFirst("head meta[property=og:image]")?.attr("content") ?: "" val title = doc.selectFirst(".ls-title-serie")?.text() ?: "" val description = doc.selectFirst("p.text-justify.fc-dark")?.text() ?: "" @@ -103,9 +103,9 @@ class MundoDonghuaProvider : MainAPI() { "Finalizada" -> ShowStatus.Completed else -> null } - val specialEpisodes = doc2.selectFirst("sm-row bg-white pt-10 pr-20 pb-15 pl-20")!!.selectFirst("row")!!.select("item col-lg-2 col-md-2 col-xs-4")!!.map { + val specialEpisodes = doc2.selectFirst("sm-row bg-white pt-10 pr-20 pb-15 pl-20")!!.selectFirst("row")!!.select("item col-lg-2 col-md-2 col-xs-4").map { if (it.selectFirst("sf fc-dark f-bold")?.text()?.contains(title) ?: false) { - val name = it.selectFirst("sf fc-dark f-bold")?.text()?.replace("Episodio","-") + val name = it.selectFirst("sf fc-dark f-bold")?.text()?.replace("Episodio","-") ?: "fallo" val link = it.attr("href") Episode(fixUrl(link), name) } @@ -120,7 +120,7 @@ class MundoDonghuaProvider : MainAPI() { val tvType = if (typeinfo.contains(Regex("Tipo.*Pel.cula"))) TvType.AnimeMovie else TvType.Anime return newAnimeLoadResponse(title, url, tvType) { posterUrl = poster - addEpisodes(DubStatus.Subbed, episodesFinal.filterIsInstance()) + addEpisodes(DubStatus.Subbed, episodesFinal.filterNotNull().filterIsInstance()) showStatus = status plot = description tags = genres