mirror of
https://github.com/recloudstream/cloudstream-extensions-multilingual.git
synced 2024-08-15 03:15:14 +00:00
Repair last chapters bug in MundoDonghua Provider (#67)
This commit is contained in:
parent
94462ea208
commit
dc4ca1991f
2 changed files with 5 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
|||
// use an integer for version numbers
|
||||
version = 1
|
||||
version = 2
|
||||
|
||||
|
||||
cloudstream {
|
||||
|
@ -23,4 +23,4 @@ cloudstream {
|
|||
)
|
||||
|
||||
iconUrl = "https://www.google.com/s2/favicons?domain=www.mundodonghua.com&sz=%size%"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,9 +36,10 @@ class MundoDonghuaProvider : MainAPI() {
|
|||
val title = it.selectFirst("h5")?.text() ?: ""
|
||||
val poster = it.selectFirst(".fit-1 img")?.attr("src")
|
||||
val epRegex = Regex("(\\/(\\d+)\$)")
|
||||
val url = it.selectFirst("a")?.attr("href")?.replace(epRegex,"")?.replace("/ver/","/donghua/")
|
||||
val epnumRegex = Regex("((\\d+)$)")
|
||||
val epNum = epnumRegex.find(title)?.value?.toIntOrNull()
|
||||
val epNumRemoveRegex = Regex("/" + epNum.toString() + "/.*")
|
||||
val url = it.selectFirst("a")?.attr("href")?.replace(epRegex,"")?.replace("/ver/","/donghua/")?.replace(epNumRemoveRegex,"")
|
||||
val dubstat = if (title.contains("Latino") || title.contains("Castellano")) DubStatus.Dubbed else DubStatus.Subbed
|
||||
newAnimeSearchResponse(title.replace(Regex("Episodio|(\\d+)"),"").trim(), fixUrl(url ?: "")) {
|
||||
this.posterUrl = fixUrl(poster ?: "")
|
||||
|
@ -214,4 +215,4 @@ class MundoDonghuaProvider : MainAPI() {
|
|||
}
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue