diff --git a/src/en/explosm/build.gradle b/src/en/explosm/build.gradle index e6a87d2b4..a1f08f2dc 100644 --- a/src/en/explosm/build.gradle +++ b/src/en/explosm/build.gradle @@ -5,7 +5,7 @@ ext { appName = 'Tachiyomi: Cyanide & Happiness' pkgNameSuffix = 'en.explosm' extClass = '.Explosm' - extVersionCode = 1 + extVersionCode = 2 libVersion = '1.2' } diff --git a/src/en/explosm/src/eu/kanade/tachiyomi/extension/en/explosm/Explosm.kt b/src/en/explosm/src/eu/kanade/tachiyomi/extension/en/explosm/Explosm.kt index 4d6ea9f72..949b4f522 100644 --- a/src/en/explosm/src/eu/kanade/tachiyomi/extension/en/explosm/Explosm.kt +++ b/src/en/explosm/src/eu/kanade/tachiyomi/extension/en/explosm/Explosm.kt @@ -10,6 +10,8 @@ import okhttp3.Response import org.jsoup.nodes.Document import rx.Observable import org.jsoup.nodes.Element +import java.util.Locale +import java.text.SimpleDateFormat class Explosm : HttpSource() { @@ -80,10 +82,14 @@ class Explosm : HttpSource() { } private fun Document.chaptersFromDocument(): List { - return this.select("div.inner-wrap > div.row div.row.collapse").map { + return this.select("div.inner-wrap > div.row div.row.collapse").map { element -> SChapter.create().apply { - setUrlWithoutDomain(it.select("a").attr("href")) - name = it.select("div#comic-author").text() + setUrlWithoutDomain(element.select("a").attr("href")) + element.select("div#comic-author").text().let { cName -> + name = cName + date_upload = SimpleDateFormat("yyyy.MM.dd", Locale.getDefault()) + .parse(cName.substringBefore(" ")).time + } } } }