Emerald fix old chapter (#4837)
new chapter doesnt have complete imgUrl in script but old chapter already had complete imgUrl
This commit is contained in:
parent
3145072586
commit
d4f818b7a8
|
@ -5,7 +5,7 @@ ext {
|
|||
extName = 'Emerald'
|
||||
pkgNameSuffix = 'all.emerald'
|
||||
extClass = '.EmeraldFactory'
|
||||
extVersionCode = 4
|
||||
extVersionCode = 5
|
||||
libVersion = '1.2'
|
||||
}
|
||||
|
||||
|
|
|
@ -290,9 +290,16 @@ open class Emerald(
|
|||
|
||||
val imgArray = JSONArray(script.substringAfter("const images = ").substringBefore(";"))
|
||||
if (imgArray != null) {
|
||||
for (i in 0 until imgArray.length()) {
|
||||
val imgUrl = imgArray.get(i)
|
||||
pages.add(Page(i, "", "https:${server}$imgUrl"))
|
||||
if (script.contains("bato.to/images")) {
|
||||
for (i in 0 until imgArray.length()) {
|
||||
val imgUrl = imgArray.get(i)
|
||||
pages.add(Page(i, "", "$imgUrl"))
|
||||
}
|
||||
} else {
|
||||
for (i in 0 until imgArray.length()) {
|
||||
val imgUrl = imgArray.get(i)
|
||||
pages.add(Page(i, "", "https:${server}$imgUrl"))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue