Small adjustment to show chapter number in chapter list (#1606)

Small adjustment to show chapter number in chapter list
This commit is contained in:
Weasy 2019-10-03 13:20:12 +02:00 committed by arkon
parent 15ad205843
commit 2aa04fe518
2 changed files with 7 additions and 2 deletions

View File

@ -5,7 +5,7 @@ ext {
appName = 'Tachiyomi: Mangahub'
pkgNameSuffix = 'en.mangahub'
extClass = '.Mangahub'
extVersionCode = 1
extVersionCode = 2
libVersion = '1.2'
}

View File

@ -81,7 +81,12 @@ class Mangahub : ParsedHttpSource() {
override fun chapterFromElement(element: Element): SChapter {
val chapter = SChapter.create()
chapter.setUrlWithoutDomain(URL(element.attr("href")).path)
chapter.name = element.select("span._8Qtbo span._2IG5P").first().text().replaceFirst("-", "").trim()
val titleHeader = element.select(".text-secondary").first()
val number = titleHeader.select("._3D1SJ").first().text()
val title = titleHeader.select("._2IG5P").first().text()
chapter.name = "$number $title"
chapter.date_upload = element.select("small.UovLc").first()?.text()?.let { parseChapterDate(it) } ?: 0
return chapter
}