Nodrakorid & Hdmovie2: fix episodes list

This commit is contained in:
sora 2023-08-06 01:59:19 +07:00
parent b04f604e74
commit 5341a03eb6
7 changed files with 20 additions and 25 deletions

View file

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

View file

@ -46,7 +46,9 @@ open class Gomov : MainAPI() {
val posterUrl = fixUrlNull(this.selectFirst("a > img")?.attr("src"))?.fixImageQuality()
val quality = this.select("div.gmr-qual, div.gmr-quality-item > a").text().trim().replace("-", "")
return if (quality.isEmpty()) {
val episode = this.select("div.gmr-numbeps > span").text().toIntOrNull()
val episode =
Regex("Episode\\s?([0-9]+)").find(title)?.groupValues?.getOrNull(1)?.toIntOrNull()
?: this.select("div.gmr-numbeps > span").text().toIntOrNull()
newAnimeSearchResponse(title, href, TvType.TvSeries) {
this.posterUrl = posterUrl
addSub(episode)

View file

@ -35,7 +35,7 @@ class Nodrakorid : DutaMovie() {
ele.ownText().filter { it.isDigit() }.toIntOrNull() to ele.select("a")
.map { it.attr("href") to it.text() }
}.filter { it.first != null }
Episode(siblings.toJson(), episode = num.filter { it.isDigit() }.toIntOrNull())
Episode(siblings.toJson(), episode = Regex("Episode\\s?([0-9]+)").find(num)?.groupValues?.getOrNull(1)?.toIntOrNull())
}
}
}