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 // use an integer for version numbers
version = 2 version = 3
cloudstream { cloudstream {

View file

@ -109,13 +109,13 @@ class MundoDonghuaProvider : MainAPI() {
val link = it.attr("href") val link = it.attr("href")
Episode(fixUrl(link), name) Episode(fixUrl(link), name)
} }
} }.filterNotNull()
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()
val link = it.attr("href") val link = it.attr("href")
Episode(fixUrl(link), name) Episode(fixUrl(link), name)
}.reversed() }.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 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 val tvType = if (typeinfo.contains(Regex("Tipo.*Pel.cula"))) TvType.AnimeMovie else TvType.Anime
return newAnimeLoadResponse(title, url, tvType) { return newAnimeLoadResponse(title, url, tvType) {