fix & add latest chapter timestamp (#5129)

* fix latest chapter timestamp

error when there is no chapter

* add latest chapter timestamp to manhuaID
This commit is contained in:
Riztard Lanthorn
2020-12-14 19:47:27 +07:00
committed by GitHub
parent 8ca71f5311
commit df408c356a
6 changed files with 27 additions and 5 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'WP MangaReader (multiple sources)'
pkgNameSuffix = 'all.wpmangareader'
extClass = '.WPMangaReaderFactory'
extVersionCode = 1
extVersionCode = 2
libVersion = '1.2'
}

View File

@ -93,7 +93,8 @@ abstract class WPMangaReader(
// Add timestamp to latest chapter, taken from "Updated On". so source which not provide chapter timestamp will have atleast one
val date = document.select(".listinfo li:contains(update) time").attr("datetime")
if (date != "") chapters[0].date_upload = parseDate(date)
val checkChapter = document.select(chapterListSelector()).firstOrNull()
if (date != "" && checkChapter != null) chapters[0].date_upload = parseDate(date)
return chapters
}