ManhwaWeb: Filter out unreleased chapters (#8282)

filter out not released chapters
This commit is contained in:
bapeey 2025-03-31 09:40:30 -05:00 committed by Draff
parent 7457106c23
commit 10cea1e57d
No known key found for this signature in database
GPG Key ID: E8A89F3211677653
2 changed files with 4 additions and 2 deletions

View File

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

View File

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