mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
created safe zone in Kickassanime
This commit is contained in:
parent
ef7314139a
commit
2dd0d2e9b1
2 changed files with 4 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 3
|
version = 4
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
|
|
|
@ -270,8 +270,8 @@ class Kickassanime : MainAPI() {
|
||||||
) {
|
) {
|
||||||
var data = app.get("$url&action=config", referer = url).text
|
var data = app.get("$url&action=config", referer = url).text
|
||||||
while(true) {
|
while(true) {
|
||||||
if(data.startsWith("{")) break
|
if(data.startsWith("{") || data == "null") break
|
||||||
data = data.decodeBase64()
|
data = data.base64Decode()
|
||||||
}
|
}
|
||||||
tryParseJson<SapphireSources>(data).let { res ->
|
tryParseJson<SapphireSources>(data).let { res ->
|
||||||
res?.streams?.filter { it.format == "adaptive_hls" }?.map { source ->
|
res?.streams?.filter { it.format == "adaptive_hls" }?.map { source ->
|
||||||
|
@ -349,7 +349,7 @@ class Kickassanime : MainAPI() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun String.decodeBase64(): String {
|
private fun String.base64Decode(): String {
|
||||||
return Base64.decode(this, Base64.DEFAULT).toString(Charsets.UTF_8)
|
return Base64.decode(this, Base64.DEFAULT).toString(Charsets.UTF_8)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue