ManhwaWeb: Filter out chapters without url (#3694)

fix chapter null
This commit is contained in:
Yush0DAN 2024-06-22 01:43:55 -06:00 committed by GitHub
parent f1b73392aa
commit 2beef52dd5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
ext {
extName = 'ManhwaWeb'
extClass = '.ManhwaWeb'
extVersionCode = 3
extVersionCode = 4
isNsfw = true
}

View File

@ -132,7 +132,7 @@ class ManhwaWeb : HttpSource() {
override fun chapterListParse(response: Response): List<SChapter> {
val result = json.decodeFromString<PayloadChapterDto>(response.body.string())
val chapters = result.chapters.map { it.toSChapter() }
val chapters = result.chapters.filterNot { it.espUrl == null && it.rawUrl == null }.map { it.toSChapter() }
return chapters.sortedByDescending { it.chapter_number }
}