MundoDonghua Provider allowing "special" chapters

This commit is contained in:
Clyzer 2022-12-12 13:58:59 -03:00
parent b516afa03c
commit b475cf25a2
2 changed files with 3 additions and 3 deletions

View file

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

View file

@ -109,13 +109,13 @@ class MundoDonghuaProvider : MainAPI() {
val link = it.attr("href")
Episode(fixUrl(link), name)
}
}
}.filterNotNull()
val episodes = doc.select("ul.donghua-list a").map {
val name = it.selectFirst(".fs-16")?.text()
val link = it.attr("href")
Episode(fixUrl(link), name)
}.reversed()
val episodesFinal = episodes + specialEpisodes
val episodesFinal = specialEpisodes + episodes
val typeinfo = doc.select("div.row div.col-md-6.pl-15 p.fc-dark").text()
val tvType = if (typeinfo.contains(Regex("Tipo.*Pel.cula"))) TvType.AnimeMovie else TvType.Anime
return newAnimeLoadResponse(title, url, tvType) {