From 78d044bf878082bcf4eb08c60d2e9dff7f8040e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20S=C3=A1nchez?= Date: Mon, 12 Dec 2022 16:07:28 -0300 Subject: [PATCH] Update MundoDonghuaProvider.kt --- .../main/kotlin/com/lagradost/MundoDonghuaProvider.kt | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/MundoDonghuaProvider/src/main/kotlin/com/lagradost/MundoDonghuaProvider.kt b/MundoDonghuaProvider/src/main/kotlin/com/lagradost/MundoDonghuaProvider.kt index 8119292..6f3bfaa 100644 --- a/MundoDonghuaProvider/src/main/kotlin/com/lagradost/MundoDonghuaProvider.kt +++ b/MundoDonghuaProvider/src/main/kotlin/com/lagradost/MundoDonghuaProvider.kt @@ -103,14 +103,12 @@ class MundoDonghuaProvider : MainAPI() { else -> null } var counter = 0 - var condition = false val specialEpisodes = app.get(mainUrl, timeout = 120).document.select(".col-xs-4").map { counter = counter + 1 - if (counter < 7){ - condition = it.selectFirst("h5")?.text()?.lowercase()?.contains(title.lowercase()) ?: false - if (condition != null && condition == true) { - val name = it.selectFirst("h5")?.text()?.replace("Episodio","-") ?: "" - val link = it.selectFirst("a")?.attr("href") ?: "" + if (counter < 7) + val name = it.selectFirst("h5")?.text()?.replace("Episodio","-") ?: "" + val link = it.selectFirst("a")?.attr("href") ?: "" + if (name.lowercase().contains(title.lowercase())) { Episode(fixUrl(link), name) } }