webtoons: add total chapter and icon (#344)

This commit is contained in:
Carlos 2018-06-04 12:14:27 -04:00 committed by GitHub
parent 8d2ecf9cbd
commit 82f7456d0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 9 additions and 3 deletions

View File

@ -5,9 +5,9 @@ ext {
appName = 'Tachiyomi: Webtoons'
pkgNameSuffix = "en.webtoons"
extClass = '.Webtoons'
extVersionCode = 1
extVersionCode = 2
extVersionSuffix = 1
libVersion = '1.0'
libVersion = '1.2'
}
apply from: "$rootDir/common.gradle"

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

View File

@ -33,7 +33,9 @@ class Webtoons : ParsedHttpSource() {
Calendar.THURSDAY -> "div._list_THURSDAY"
Calendar.FRIDAY -> "div._list_FRIDAY"
Calendar.SATURDAY -> "div._list_SATURDAY"
else -> { "div" }
else -> {
"div"
}
}
}
@ -132,6 +134,10 @@ class Webtoons : ParsedHttpSource() {
val chapter = SChapter.create()
chapter.setUrlWithoutDomain(urlElement.attr("href"))
chapter.name = element.select("a > div.row > div.info > p.sub_title > span.ellipsis").text()
val select = element.select("a > div.row > div.num")
if (select.isNotEmpty()) {
chapter.name = chapter.name + " Ch. " + select.text()
}
chapter.date_upload = element.select("a > div.row > div.info > p.date").text()?.let { SimpleDateFormat("MMM d, yyyy", Locale.ENGLISH).parse(it).time } ?: 0
return chapter
}