mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
fixed #432
This commit is contained in:
parent
fb73c9eabb
commit
a496f79f05
13 changed files with 31 additions and 208 deletions
|
@ -1,5 +1,5 @@
|
|||
// use an integer for version numbers
|
||||
version = 7
|
||||
version = 8
|
||||
|
||||
|
||||
cloudstream {
|
||||
|
|
|
@ -138,7 +138,7 @@ class Animasu : MainAPI() {
|
|||
document.select(".mobius > .mirror > option").mapNotNull {
|
||||
fixUrl(Jsoup.parse(base64Decode(it.attr("value"))).select("iframe").attr("src")) to it.text()
|
||||
}.apmap { (iframe, quality) ->
|
||||
loadFixedExtractor(iframe, quality, "$mainUrl/", subtitleCallback, callback)
|
||||
loadFixedExtractor(iframe.fixIframe(), quality, "$mainUrl/", subtitleCallback, callback)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
@ -166,6 +166,14 @@ class Animasu : MainAPI() {
|
|||
}
|
||||
}
|
||||
|
||||
private fun String.fixIframe() : String {
|
||||
return if(this.startsWith("https://dl.berkasdrive.com")) {
|
||||
base64Decode(this.substringAfter("id="))
|
||||
} else {
|
||||
this
|
||||
}
|
||||
}
|
||||
|
||||
private fun getIndexQuality(str: String?): Int {
|
||||
return Regex("(\\d{3,4})[pP]").find(str ?: "")?.groupValues?.getOrNull(1)?.toIntOrNull()
|
||||
?: Qualities.Unknown.value
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue