Fix last LittleGarden chapters (#13415)

* Update LittleGarden.kt

* Update build.gradle
This commit is contained in:
Sapphire 2022-09-10 16:34:08 +02:00 committed by GitHub
parent 8e00e14dc2
commit 0b2ddf3477
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'Little Garden'
pkgNameSuffix = 'all.littlegarden'
extClass = '.LittleGarden'
extVersionCode = 1
extVersionCode = 2
}
apply from: "$rootDir/common.gradle"

View File

@ -174,7 +174,7 @@ class LittleGarden : ParsedHttpSource() {
val pages = mutableListOf<Page>()
val chapNb = document.selectFirst("div.chapter-number").text().trim().toInt()
val engChaps: IntArray = intArrayOf(970, 987, 992)
if (document.selectFirst("div.manga-name").text().trim() == "One Piece" && (engChaps.contains(chapNb) || chapNb > 994)) { // Permits to get French pages rather than English pages for some chapters
if (document.selectFirst("div.manga-name").text().trim() == "One Piece" && (engChaps.contains(chapNb) || chapNb > 1004)) { // Permits to get French pages rather than English pages for some chapters
oricolPageRegex.findAll(document.select("script:containsData(pages)").toString()).asIterable().mapIndexed { i, it ->
if (it.groups["colored"]?.value?.contains("\"") == true) { // Their JS dict has " " around the link only when available. Also uses colored pages rather than B&W as it's the main strength of this site
pages.add(Page(i, "", cdnUrl + it.groups["colored"]?.value?.replace("\"", "") + ".webp"))