fix mangasee some chapter cant load (#5647)

some chapter cant load properly, because some chapter url cant load with extra 0
This commit is contained in:
Riztard Lanthorn 2021-02-06 21:22:54 +07:00 committed by GitHub
parent ba1e62d960
commit a3517579ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'Mangasee'
pkgNameSuffix = 'en.mangasee'
extClass = '.Mangasee'
extVersionCode = 15
extVersionCode = 16
libVersion = '1.2'
}

View File

@ -216,7 +216,8 @@ class Mangasee : HttpSource() {
var index = ""
val t = e.substring(0, 1).toInt()
if (1 != t) { index = "-index-$t" }
val n = e.substring(1, e.length - 1)
val dgt = if (e.toInt() < 100100) { 4 } else if (e.toInt() < 101000) { 3 } else if (e.toInt() < 110000) { 2 } else { 1 }
val n = e.substring(dgt, e.length - 1)
var suffix = ""
val path = e.substring(e.length - 1).toInt()
if (0 != path) { suffix = ".$path" }