fixed AnimeSail

This commit is contained in:
hexated 2023-04-11 10:07:10 +07:00
parent 3ca01b9b81
commit 6d77ca847d
2 changed files with 2 additions and 2 deletions

View file

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

View file

@ -118,7 +118,7 @@ class AnimeSailProvider : MainAPI() {
val episodes = document.select("ul.daftar > li").map { val episodes = document.select("ul.daftar > li").map {
val link = fixUrl(it.select("a").attr("href")) val link = fixUrl(it.select("a").attr("href"))
val name = it.select("a").text() val name = it.select("a").text()
val episode = Regex("(\\d+[.,]?\\d*)").find(name)?.groupValues?.getOrNull(0)?.toIntOrNull() val episode = Regex("Episode\\s?(\\d+)").find(name)?.groupValues?.getOrNull(0)?.toIntOrNull()
Episode(link, name, episode = episode) Episode(link, name, episode = episode)
}.reversed() }.reversed()