[RU]WebOfComics more works chapters (#11926)

This commit is contained in:
Ejan 2022-05-22 03:48:12 +05:00 committed by GitHub
parent 5b1a81ec44
commit 095c33be4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 8 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'Web of Comics' extName = 'Web of Comics'
pkgNameSuffix = 'ru.webofcomics' pkgNameSuffix = 'ru.webofcomics'
extClass = '.WebOfComics' extClass = '.WebOfComics'
extVersionCode = 2 extVersionCode = 3
} }
dependencies { dependencies {

View File

@ -340,16 +340,24 @@ class WebOfComics : ParsedHttpSource() {
.substringBefore("\">") .substringBefore("\">")
.trim() .trim()
var subPage = "" val countSubPage = counterPageStr.split("document.write").size
return (startPageStr.toInt() until endPageStr.toInt()).mapIndexed { index, page -> return (startPageStr.toInt() until endPageStr.toInt()).mapIndexed { index, page ->
if (startPageStr == "0") { val subPage = when (countSubPage) {
subPage = when { 3 -> {
when {
page < 10 -> "0"
else -> ""
}
}
4 -> {
when {
page < 10 -> "00" page < 10 -> "00"
page < 100 -> "0" page < 100 -> "0"
else -> "" else -> ""
} }
} }
else -> ""
}
Page( Page(
index, index,
"", "",