Fix readmanga/mintmanga npe on chapter parse (#1876)
Fix readmanga/mintmanga npe on chapter parse
This commit is contained in:
parent
43b66fa0fe
commit
725a81257a
|
@ -5,7 +5,7 @@ ext {
|
|||
appName = 'Tachiyomi: Mintmanga'
|
||||
pkgNameSuffix = 'ru.mintmanga'
|
||||
extClass = '.Mintmanga'
|
||||
extVersionCode = 14
|
||||
extVersionCode = 15
|
||||
libVersion = '1.2'
|
||||
}
|
||||
|
||||
|
|
|
@ -151,7 +151,7 @@ class Mintmanga : ParsedHttpSource() {
|
|||
}
|
||||
}
|
||||
val dots = chapter.name.indexOf("…")
|
||||
val numbers = chapter.name.findAnyOf(IntRange(0, 9).map { it.toString() })!!.first
|
||||
val numbers = chapter.name.findAnyOf(IntRange(0, 9).map { it.toString() })?.first ?: 0
|
||||
|
||||
if (dots in 0 until numbers) {
|
||||
chapter.name = chapter.name.substringAfter("…").trim()
|
||||
|
|
|
@ -5,7 +5,7 @@ ext {
|
|||
appName = 'Tachiyomi: Readmanga'
|
||||
pkgNameSuffix = 'ru.readmanga'
|
||||
extClass = '.Readmanga'
|
||||
extVersionCode = 14
|
||||
extVersionCode = 15
|
||||
libVersion = '1.2'
|
||||
}
|
||||
|
||||
|
|
|
@ -151,7 +151,7 @@ class Readmanga : ParsedHttpSource() {
|
|||
}
|
||||
}
|
||||
val dots = chapter.name.indexOf("…")
|
||||
val numbers = chapter.name.findAnyOf(IntRange(0, 9).map { it.toString() })!!.first
|
||||
val numbers = chapter.name.findAnyOf(IntRange(0, 9).map { it.toString() })?.first ?: 0
|
||||
|
||||
if (dots in 0 until numbers) {
|
||||
chapter.name = chapter.name.substringAfter("…").trim()
|
||||
|
|
Loading…
Reference in New Issue