Filter out unpublished chapters without an external url

This commit is contained in:
Jobobby04 2021-12-26 12:24:35 -05:00
parent 3ec0777d63
commit d60ff91ae4

View File

@ -165,7 +165,9 @@ class ApiMangaParser(
} }
fun chapterListParse(chapterListResponse: List<ChapterDataDto>, groupMap: Map<String, String>): List<ChapterInfo> { fun chapterListParse(chapterListResponse: List<ChapterDataDto>, groupMap: Map<String, String>): List<ChapterInfo> {
val now = System.currentTimeMillis()
return chapterListResponse return chapterListResponse
.filterNot { MdUtil.parseDate(it.attributes.publishAt) > now && it.attributes.externalUrl == null }
.map { .map {
mapChapter(it, groupMap) mapChapter(it, groupMap)
} }