Update MundoDonghuaProvider.kt

This commit is contained in:
Diego Sánchez 2022-12-12 23:29:25 -03:00 committed by GitHub
parent e2fabddc93
commit fd0c5f4b42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -103,7 +103,10 @@ class MundoDonghuaProvider : MainAPI() {
"Finalizada" -> ShowStatus.Completed "Finalizada" -> ShowStatus.Completed
else -> null else -> null
} }
var counter = 0
val specialEpisodes = docSpecial.select(".col-xs-4").mapNotNull { val specialEpisodes = docSpecial.select(".col-xs-4").mapNotNull {
counter++
if (counter < 7) {
val name = it.selectFirst("h5")?.text()?.replace("Episodio","-") ?: "" val name = it.selectFirst("h5")?.text()?.replace("Episodio","-") ?: ""
val link = it.selectFirst("a")?.attr("href") ?: "" val link = it.selectFirst("a")?.attr("href") ?: ""
if (name.contains(title, true)) { if (name.contains(title, true)) {
@ -111,6 +114,9 @@ class MundoDonghuaProvider : MainAPI() {
} else { } else {
null null
} }
} else {
null
}
}.reversed() }.reversed()
val episodes = doc.select("ul.donghua-list a").map { val episodes = doc.select("ul.donghua-list a").map {
val name = it.selectFirst(".fs-16")?.text() val name = it.selectFirst(".fs-16")?.text()