Bato.to: Fix page list (#850)
* Bato.to: Fix page list * Remove overengineering
This commit is contained in:
parent
0ca16707e2
commit
a200ab1081
@ -1,7 +1,7 @@
|
|||||||
ext {
|
ext {
|
||||||
extName = 'Bato.to'
|
extName = 'Bato.to'
|
||||||
extClass = '.BatoToFactory'
|
extClass = '.BatoToFactory'
|
||||||
extVersionCode = 34
|
extVersionCode = 35
|
||||||
isNsfw = true
|
isNsfw = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -468,8 +468,15 @@ open class BatoTo(
|
|||||||
val imgAccListString = CryptoAES.decrypt(batoWord.removeSurrounding("\""), evaluatedPass)
|
val imgAccListString = CryptoAES.decrypt(batoWord.removeSurrounding("\""), evaluatedPass)
|
||||||
val imgAccList = json.parseToJsonElement(imgAccListString).jsonArray.map { it.jsonPrimitive.content }
|
val imgAccList = json.parseToJsonElement(imgAccListString).jsonArray.map { it.jsonPrimitive.content }
|
||||||
|
|
||||||
return imageUrls.zip(imgAccList).mapIndexed { i, (imgUrl, imgAcc) ->
|
return imageUrls.mapIndexed { i, it ->
|
||||||
Page(i, imageUrl = "$imgUrl?$imgAcc")
|
val acc = imgAccList.getOrNull(i)
|
||||||
|
val url = if (acc != null) {
|
||||||
|
"$it?$acc"
|
||||||
|
} else {
|
||||||
|
it
|
||||||
|
}
|
||||||
|
|
||||||
|
Page(i, imageUrl = url)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user